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

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

Issue 14888002: Android WebView Merged-Thread Hardware Draw (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 7 years, 7 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_BROWSER_BROWSER_VIEW_RENDERER_IMPL_H_ 5 #ifndef ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_IMPL_H_
6 #define ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_IMPL_H_ 6 #define ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_IMPL_H_
7 7
8 #include "android_webview/browser/browser_view_renderer.h" 8 #include "android_webview/browser/browser_view_renderer.h"
9 #include "android_webview/browser/renderer_host/view_renderer_host.h" 9 #include "android_webview/browser/renderer_host/view_renderer_host.h"
10 #include "content/public/browser/android/compositor.h" 10 #include "content/public/browser/android/compositor.h"
(...skipping 19 matching lines...) Expand all
30 class Vector2dF; 30 class Vector2dF;
31 } 31 }
32 32
33 namespace android_webview { 33 namespace android_webview {
34 34
35 class BrowserViewRendererImpl 35 class BrowserViewRendererImpl
36 : public BrowserViewRenderer, 36 : public BrowserViewRenderer,
37 public ViewRendererHost::Client, 37 public ViewRendererHost::Client,
38 public content::Compositor::Client { 38 public content::Compositor::Client {
39 public: 39 public:
40 static BrowserViewRendererImpl* Create(BrowserViewRenderer::Client* client, 40 static BrowserViewRenderer* Create(BrowserViewRenderer::Client* client,
41 JavaHelper* java_helper); 41 JavaHelper* java_helper);
42 static BrowserViewRendererImpl* FromWebContents( 42 static BrowserViewRendererImpl* FromWebContents(
43 content::WebContents* contents); 43 content::WebContents* contents);
44 static BrowserViewRendererImpl* FromId(int render_process_id,
45 int render_view_id);
46 static void SetAwDrawSWFunctionTable(AwDrawSWFunctionTable* table); 44 static void SetAwDrawSWFunctionTable(AwDrawSWFunctionTable* table);
47 45
48 virtual ~BrowserViewRendererImpl(); 46 virtual ~BrowserViewRendererImpl();
49 47
50 virtual void BindSynchronousCompositor(
51 content::SynchronousCompositor* compositor);
52
53 // BrowserViewRenderer implementation. 48 // BrowserViewRenderer implementation.
54 virtual void SetContents( 49 virtual void SetContents(
55 content::ContentViewCore* content_view_core) OVERRIDE; 50 content::ContentViewCore* content_view_core) OVERRIDE;
56 virtual void DrawGL(AwDrawGLInfo* draw_info) OVERRIDE; 51 virtual void DrawGL(AwDrawGLInfo* draw_info) OVERRIDE;
57 virtual void SetScrollForHWFrame(int x, int y) OVERRIDE; 52 virtual void SetScrollForHWFrame(int x, int y) OVERRIDE;
58 virtual bool DrawSW(jobject java_canvas, const gfx::Rect& clip) OVERRIDE; 53 virtual bool DrawSW(jobject java_canvas, const gfx::Rect& clip) OVERRIDE;
59 virtual base::android::ScopedJavaLocalRef<jobject> CapturePicture() OVERRIDE; 54 virtual base::android::ScopedJavaLocalRef<jobject> CapturePicture() OVERRIDE;
60 virtual void EnableOnNewPicture(bool enabled) OVERRIDE; 55 virtual void EnableOnNewPicture(bool enabled) OVERRIDE;
61 virtual void OnVisibilityChanged( 56 virtual void OnVisibilityChanged(
62 bool view_visible, bool window_visible) OVERRIDE; 57 bool view_visible, bool window_visible) OVERRIDE;
63 virtual void OnSizeChanged(int width, int height) OVERRIDE; 58 virtual void OnSizeChanged(int width, int height) OVERRIDE;
64 virtual void OnAttachedToWindow(int width, int height) OVERRIDE; 59 virtual void OnAttachedToWindow(int width, int height) OVERRIDE;
65 virtual void OnDetachedFromWindow() OVERRIDE; 60 virtual void OnDetachedFromWindow() OVERRIDE;
66 virtual bool IsAttachedToWindow() OVERRIDE; 61 virtual bool IsAttachedToWindow() OVERRIDE;
67 virtual bool IsViewVisible() OVERRIDE; 62 virtual bool IsViewVisible() OVERRIDE;
68 virtual gfx::Rect GetScreenRect() OVERRIDE; 63 virtual gfx::Rect GetScreenRect() OVERRIDE;
69 64
70 // content::Compositor::Client implementation. 65 // content::Compositor::Client implementation.
71 virtual void ScheduleComposite() OVERRIDE; 66 virtual void ScheduleComposite() OVERRIDE;
72 67
73 // ViewRendererHost::Client implementation. 68 // ViewRendererHost::Client implementation.
74 virtual void OnPictureUpdated(int process_id, int render_view_id) OVERRIDE; 69 virtual void OnPictureUpdated(int process_id, int render_view_id) OVERRIDE;
75 virtual void OnPageScaleFactorChanged(int process_id,
76 int render_view_id,
77 float page_scale_factor) OVERRIDE;
78 70
79 protected: 71 protected:
80 BrowserViewRendererImpl(BrowserViewRenderer::Client* client, 72 BrowserViewRendererImpl(BrowserViewRenderer::Client* client,
81 JavaHelper* java_helper); 73 JavaHelper* java_helper);
82 74
83 virtual bool RenderPicture(SkCanvas* canvas); 75 virtual bool RenderPicture(SkCanvas* canvas);
84 76
85 private: 77 private:
86 class UserData; 78 class UserData;
87 friend class UserData; 79 friend class UserData;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 content::ContentViewCore::UpdateFrameInfoCallback update_frame_info_callback_; 136 content::ContentViewCore::UpdateFrameInfoCallback update_frame_info_callback_;
145 137
146 bool prevent_client_invalidate_; 138 bool prevent_client_invalidate_;
147 139
148 DISALLOW_COPY_AND_ASSIGN(BrowserViewRendererImpl); 140 DISALLOW_COPY_AND_ASSIGN(BrowserViewRendererImpl);
149 }; 141 };
150 142
151 } // namespace android_webview 143 } // namespace android_webview
152 144
153 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_IMPL_H_ 145 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698