Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Side by Side Diff: android_webview/native/java_browser_view_renderer_helper.h

Issue 176543004: aw: Split hardware rendering into HardwareRenderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: similarity 10 Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ANDROID_WEBVIEW_NATIVE_JAVA_BROWSER_VIEW_RENDERER_HELPER_H_ 5 #ifndef ANDROID_WEBVIEW_NATIVE_JAVA_BROWSER_VIEW_RENDERER_HELPER_H_
6 #define ANDROID_WEBVIEW_NATIVE_JAVA_BROWSER_VIEW_RENDERER_HELPER_H_ 6 #define ANDROID_WEBVIEW_NATIVE_JAVA_BROWSER_VIEW_RENDERER_HELPER_H_
7 7
8 #include "android_webview/browser/browser_view_renderer.h" 8 #include "android_webview/browser/browser_view_renderer.h"
9 #include "base/android/scoped_java_ref.h" 9 #include "base/android/scoped_java_ref.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 11
12 namespace android_webview { 12 namespace android_webview {
13 13
14 // Native side of java-class of same name. 14 // Native side of java-class of same name.
15 // Provides utility methods for rendering involving with Java objects. 15 // Provides utility methods for rendering involving with Java objects.
16 // TODO(boliu): Rename this class to JavaRasterHelper. 16 // TODO(boliu): Rename this class to JavaRasterHelper.
17 class JavaBrowserViewRendererHelper : public BrowserViewRenderer::JavaHelper { 17 class JavaBrowserViewRendererHelper : public BrowserViewRendererJavaHelper {
benm (inactive) 2014/02/25 12:48:01 naming is a little crazy here imo. is now the time
boliu 2014/02/25 19:02:22 Didn't do this yet. Kind of big-ish change, so bet
18 public: 18 public:
19 JavaBrowserViewRendererHelper(); 19 JavaBrowserViewRendererHelper();
20 virtual ~JavaBrowserViewRendererHelper(); 20 virtual ~JavaBrowserViewRendererHelper();
21 21
22 static void SetAwDrawSWFunctionTable(AwDrawSWFunctionTable* table); 22 static void SetAwDrawSWFunctionTable(AwDrawSWFunctionTable* table);
23 static JavaBrowserViewRendererHelper* GetInstance(); 23 static JavaBrowserViewRendererHelper* GetInstance();
24 24
25 // BrowserViewRenderer::JavaHelper implementation. 25 // BrowserViewRendererJavaHelper implementation.
26 virtual bool RenderViaAuxilaryBitmapIfNeeded( 26 virtual bool RenderViaAuxilaryBitmapIfNeeded(
27 jobject java_canvas, 27 jobject java_canvas,
28 const gfx::Vector2d& scroll_correction, 28 const gfx::Vector2d& scroll_correction,
29 const gfx::Rect& clip, 29 const gfx::Rect& clip,
30 RenderMethod render_source) OVERRIDE; 30 RenderMethod render_source) OVERRIDE;
31 31
32 private: 32 private:
33 bool RenderViaAuxilaryBitmap(JNIEnv* env, 33 bool RenderViaAuxilaryBitmap(JNIEnv* env,
34 jobject java_canvas, 34 jobject java_canvas,
35 const gfx::Vector2d& scroll_correction, 35 const gfx::Vector2d& scroll_correction,
36 const gfx::Rect& clip, 36 const gfx::Rect& clip,
37 const RenderMethod& render_source); 37 const RenderMethod& render_source);
38 bool RasterizeIntoBitmap( 38 bool RasterizeIntoBitmap(
39 JNIEnv* env, 39 JNIEnv* env,
40 const base::android::JavaRef<jobject>& jbitmap, 40 const base::android::JavaRef<jobject>& jbitmap,
41 int scroll_x, 41 int scroll_x,
42 int scroll_y, 42 int scroll_y,
43 const JavaBrowserViewRendererHelper::RenderMethod& renderer); 43 const JavaBrowserViewRendererHelper::RenderMethod& renderer);
44 }; 44 };
45 45
46 bool RegisterJavaBrowserViewRendererHelper(JNIEnv* env); 46 bool RegisterJavaBrowserViewRendererHelper(JNIEnv* env);
47 47
48 } // namespace android_webview 48 } // namespace android_webview
49 49
50 #endif // ANDROID_WEBVIEW_NATIVE_JAVA_BROWSER_VIEW_RENDERER_HELPER_H_ 50 #endif // ANDROID_WEBVIEW_NATIVE_JAVA_BROWSER_VIEW_RENDERER_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698