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

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

Issue 14888002: Android WebView Merged-Thread Hardware Draw (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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_H_ 5 #ifndef ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_
6 #define ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_ 6 #define ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_
7 7
8 #include "base/android/scoped_java_ref.h" 8 #include "base/android/scoped_java_ref.h"
9 #include "ui/gfx/point.h" 9 #include "ui/gfx/point.h"
10 #include "ui/gfx/rect.h" 10 #include "ui/gfx/rect.h"
11 11
12 struct AwDrawGLInfo; 12 struct AwDrawGLInfo;
13 13
14 namespace content { 14 namespace content {
15 class ContentViewCore; 15 class ContentViewCore;
16 class WebContents; 16 class SynchronousCompositor;
17 } 17 }
18 18
19 namespace gfx { 19 namespace gfx {
20 class Rect; 20 class Rect;
21 } 21 }
22 22
23 namespace android_webview { 23 namespace android_webview {
24 24
25 // Interface for all the WebView-specific content rendering operations. 25 // Interface for all the WebView-specific content rendering operations.
26 // Provides software and hardware rendering and the Capture Picture API. 26 // Provides software and hardware rendering and the Capture Picture API.
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 protected: 69 protected:
70 virtual ~JavaHelper() {} 70 virtual ~JavaHelper() {}
71 }; 71 };
72 72
73 enum OnNewPictureMode { 73 enum OnNewPictureMode {
74 kOnNewPictureDisabled = 0, 74 kOnNewPictureDisabled = 0,
75 kOnNewPictureEnabled, 75 kOnNewPictureEnabled,
76 kOnNewPictureInvalidationOnly, 76 kOnNewPictureInvalidationOnly,
77 }; 77 };
78 78
79 // Only used for InProcessViewRenderer.
80 static BrowserViewRenderer* FromId(int render_process_id, int render_view_id);
joth 2013/05/03 01:26:26 rather than add these two in here, why not change
boliu 2013/05/03 05:25:50 Done.
81
79 // Content control methods. 82 // Content control methods.
80 virtual void SetContents(content::ContentViewCore* content_view_core) = 0; 83 virtual void SetContents(content::ContentViewCore* content_view_core) = 0;
84 virtual void BindSynchronousCompositor(
85 content::SynchronousCompositor* compositor) = 0;
81 86
82 // Hardware rendering methods. 87 // Hardware rendering methods.
83 virtual void DrawGL(AwDrawGLInfo* draw_info) = 0; 88 virtual void DrawGL(AwDrawGLInfo* draw_info) = 0;
84 virtual void SetScrollForHWFrame(int x, int y) = 0; 89 virtual void SetScrollForHWFrame(int x, int y) = 0;
85 90
86 // Software rendering methods. 91 // Software rendering methods.
87 virtual bool DrawSW(jobject java_canvas, const gfx::Rect& clip_bounds) = 0; 92 virtual bool DrawSW(jobject java_canvas, const gfx::Rect& clip_bounds) = 0;
88 93
89 // CapturePicture API methods. 94 // CapturePicture API methods.
90 virtual base::android::ScopedJavaLocalRef<jobject> CapturePicture() = 0; 95 virtual base::android::ScopedJavaLocalRef<jobject> CapturePicture() = 0;
91 virtual void EnableOnNewPicture(OnNewPictureMode mode) = 0; 96 virtual void EnableOnNewPicture(OnNewPictureMode mode) = 0;
92 97
93 // View update notifications. 98 // View update notifications.
94 virtual void OnVisibilityChanged(bool view_visible, bool window_visible) = 0; 99 virtual void OnVisibilityChanged(bool view_visible, bool window_visible) = 0;
95 virtual void OnSizeChanged(int width, int height) = 0; 100 virtual void OnSizeChanged(int width, int height) = 0;
96 virtual void OnAttachedToWindow(int width, int height) = 0; 101 virtual void OnAttachedToWindow(int width, int height) = 0;
97 virtual void OnDetachedFromWindow() = 0; 102 virtual void OnDetachedFromWindow() = 0;
98 103
99 // Android views hierarchy gluing. 104 // Android views hierarchy gluing.
100 virtual bool IsAttachedToWindow() = 0; 105 virtual bool IsAttachedToWindow() = 0;
101 virtual bool IsViewVisible() = 0; 106 virtual bool IsViewVisible() = 0;
102 virtual gfx::Rect GetScreenRect() = 0; 107 virtual gfx::Rect GetScreenRect() = 0;
103 108
104 virtual ~BrowserViewRenderer() {} 109 virtual ~BrowserViewRenderer() {}
105 }; 110 };
106 111
107 } // namespace android_webview 112 } // namespace android_webview
108 113
109 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_ 114 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698