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

Side by Side Diff: android_webview/browser/in_process_view_renderer.h

Issue 22035002: Android WebView: Make a custom Picture subclass (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: endRecording is OK Created 7 years, 4 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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_BROWSER_IN_PROCESS_VIEW_RENDERER_H_ 5 #ifndef ANDROID_WEBVIEW_BROWSER_IN_PROCESS_VIEW_RENDERER_H_
6 #define ANDROID_WEBVIEW_BROWSER_IN_PROCESS_VIEW_RENDERER_H_ 6 #define ANDROID_WEBVIEW_BROWSER_IN_PROCESS_VIEW_RENDERER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "android_webview/browser/browser_view_renderer.h" 10 #include "android_webview/browser/browser_view_renderer.h"
(...skipping 20 matching lines...) Expand all
31 public content::SynchronousCompositorClient { 31 public content::SynchronousCompositorClient {
32 public: 32 public:
33 InProcessViewRenderer(BrowserViewRenderer::Client* client, 33 InProcessViewRenderer(BrowserViewRenderer::Client* client,
34 JavaHelper* java_helper, 34 JavaHelper* java_helper,
35 content::WebContents* web_contents); 35 content::WebContents* web_contents);
36 virtual ~InProcessViewRenderer(); 36 virtual ~InProcessViewRenderer();
37 37
38 static InProcessViewRenderer* FromWebContents( 38 static InProcessViewRenderer* FromWebContents(
39 content::WebContents* contents); 39 content::WebContents* contents);
40 40
41 // TODO(joth): consider extracting this to its own utility class.
42 typedef base::Callback<bool(SkCanvas*)> RenderMethod;
43 static bool RenderViaAuxilaryBitmapIfNeeded(
44 jobject java_canvas,
45 JavaHelper* java_helper,
46 const gfx::Vector2d& scroll_correction,
47 const gfx::Rect& clip,
48 RenderMethod render_source,
49 void* owner_key);
50
41 // BrowserViewRenderer overrides 51 // BrowserViewRenderer overrides
42 virtual bool OnDraw(jobject java_canvas, 52 virtual bool OnDraw(jobject java_canvas,
43 bool is_hardware_canvas, 53 bool is_hardware_canvas,
44 const gfx::Vector2d& scroll_, 54 const gfx::Vector2d& scroll_,
45 const gfx::Rect& clip) OVERRIDE; 55 const gfx::Rect& clip) OVERRIDE;
46 virtual void DrawGL(AwDrawGLInfo* draw_info) OVERRIDE; 56 virtual void DrawGL(AwDrawGLInfo* draw_info) OVERRIDE;
47 virtual void SetGlobalVisibleRect(const gfx::Rect& visible_rect) OVERRIDE; 57 virtual void SetGlobalVisibleRect(const gfx::Rect& visible_rect) OVERRIDE;
48 virtual base::android::ScopedJavaLocalRef<jobject> CapturePicture( 58 virtual skia::RefPtr<SkPicture> CapturePicture(int width,
49 int width, 59 int height) OVERRIDE;
50 int height) OVERRIDE;
51 virtual void EnableOnNewPicture(bool enabled) OVERRIDE; 60 virtual void EnableOnNewPicture(bool enabled) OVERRIDE;
52 virtual void OnVisibilityChanged(bool visible) OVERRIDE; 61 virtual void OnVisibilityChanged(bool visible) OVERRIDE;
53 virtual void OnSizeChanged(int width, int height) OVERRIDE; 62 virtual void OnSizeChanged(int width, int height) OVERRIDE;
54 virtual void ScrollTo(gfx::Vector2d new_value) OVERRIDE; 63 virtual void ScrollTo(gfx::Vector2d new_value) OVERRIDE;
55 virtual void SetPageScaleFactor(float page_scale_factor) OVERRIDE; 64 virtual void SetPageScaleFactor(float page_scale_factor) OVERRIDE;
56 virtual void OnAttachedToWindow(int width, int height) OVERRIDE; 65 virtual void OnAttachedToWindow(int width, int height) OVERRIDE;
57 virtual void OnDetachedFromWindow() OVERRIDE; 66 virtual void OnDetachedFromWindow() OVERRIDE;
58 virtual void SetDipScale(float dip_scale) OVERRIDE; 67 virtual void SetDipScale(float dip_scale) OVERRIDE;
59 virtual bool IsAttachedToWindow() OVERRIDE; 68 virtual bool IsAttachedToWindow() OVERRIDE;
60 virtual bool IsViewVisible() OVERRIDE; 69 virtual bool IsViewVisible() OVERRIDE;
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 gfx::Vector2dF overscroll_rounding_error_; 161 gfx::Vector2dF overscroll_rounding_error_;
153 162
154 GLViewRendererManager::Key manager_key_; 163 GLViewRendererManager::Key manager_key_;
155 164
156 DISALLOW_COPY_AND_ASSIGN(InProcessViewRenderer); 165 DISALLOW_COPY_AND_ASSIGN(InProcessViewRenderer);
157 }; 166 };
158 167
159 } // namespace android_webview 168 } // namespace android_webview
160 169
161 #endif // ANDROID_WEBVIEW_BROWSER_IN_PROCESS_VIEW_RENDERER_H_ 170 #endif // ANDROID_WEBVIEW_BROWSER_IN_PROCESS_VIEW_RENDERER_H_
OLDNEW
« no previous file with comments | « android_webview/browser/browser_view_renderer.h ('k') | android_webview/browser/in_process_view_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698