OLD | NEW |
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 <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 const gfx::Vector2dF& total_scroll_offset_dip, | 122 const gfx::Vector2dF& total_scroll_offset_dip, |
123 const gfx::Vector2dF& max_scroll_offset_dip, | 123 const gfx::Vector2dF& max_scroll_offset_dip, |
124 const gfx::SizeF& scrollable_size_dip, | 124 const gfx::SizeF& scrollable_size_dip, |
125 float page_scale_factor, | 125 float page_scale_factor, |
126 float min_page_scale_factor, | 126 float min_page_scale_factor, |
127 float max_page_scale_factor) override; | 127 float max_page_scale_factor) override; |
128 void DidOverscroll(content::SynchronousCompositor* compositor, | 128 void DidOverscroll(content::SynchronousCompositor* compositor, |
129 const gfx::Vector2dF& accumulated_overscroll, | 129 const gfx::Vector2dF& accumulated_overscroll, |
130 const gfx::Vector2dF& latest_overscroll_delta, | 130 const gfx::Vector2dF& latest_overscroll_delta, |
131 const gfx::Vector2dF& current_fling_velocity) override; | 131 const gfx::Vector2dF& current_fling_velocity) override; |
| 132 void OnDrawHardwareProcessFrame( |
| 133 content::SynchronousCompositor::Frame frame) override; |
132 | 134 |
133 // CompositorFrameProducer overrides | 135 // CompositorFrameProducer overrides |
134 void OnParentDrawConstraintsUpdated( | 136 void OnParentDrawConstraintsUpdated( |
135 CompositorFrameConsumer* compositor_frame_consumer) override; | 137 CompositorFrameConsumer* compositor_frame_consumer) override; |
136 void RemoveCompositorFrameConsumer( | 138 void RemoveCompositorFrameConsumer( |
137 CompositorFrameConsumer* compositor_frame_consumer) override; | 139 CompositorFrameConsumer* compositor_frame_consumer) override; |
138 | 140 |
139 void SetActiveCompositorID(const CompositorID& compositor_id); | 141 void SetActiveCompositorID(const CompositorID& compositor_id); |
140 | 142 |
141 // Visible for testing. | 143 // Visible for testing. |
(...skipping 19 matching lines...) Expand all Loading... |
161 void UpdateMemoryPolicy(); | 163 void UpdateMemoryPolicy(); |
162 | 164 |
163 content::SynchronousCompositor* FindCompositor( | 165 content::SynchronousCompositor* FindCompositor( |
164 const CompositorID& compositor_id) const; | 166 const CompositorID& compositor_id) const; |
165 // For debug tracing or logging. Return the string representation of this | 167 // For debug tracing or logging. Return the string representation of this |
166 // view renderer's state. | 168 // view renderer's state. |
167 std::string ToString() const; | 169 std::string ToString() const; |
168 | 170 |
169 BrowserViewRendererClient* const client_; | 171 BrowserViewRendererClient* const client_; |
170 const scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_; | 172 const scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_; |
| 173 const bool async_on_draw_hardware_; |
171 CompositorFrameConsumer* current_compositor_frame_consumer_; | 174 CompositorFrameConsumer* current_compositor_frame_consumer_; |
172 std::set<CompositorFrameConsumer*> compositor_frame_consumers_; | 175 std::set<CompositorFrameConsumer*> compositor_frame_consumers_; |
173 | 176 |
174 // The current compositor that's owned by the current RVH. | 177 // The current compositor that's owned by the current RVH. |
175 content::SynchronousCompositor* compositor_; | 178 content::SynchronousCompositor* compositor_; |
176 // The process id and routing id of the most recent RVH according to | 179 // The process id and routing id of the most recent RVH according to |
177 // RVHChanged. | 180 // RVHChanged. |
178 CompositorID compositor_id_; | 181 CompositorID compositor_id_; |
179 // A map from compositor's per-WebView unique ID to the compositor's raw | 182 // A map from compositor's per-WebView unique ID to the compositor's raw |
180 // pointer. A raw pointer here is fine because the entry will be erased when | 183 // pointer. A raw pointer here is fine because the entry will be erased when |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 gfx::Vector2dF overscroll_rounding_error_; | 223 gfx::Vector2dF overscroll_rounding_error_; |
221 | 224 |
222 ParentCompositorDrawConstraints external_draw_constraints_; | 225 ParentCompositorDrawConstraints external_draw_constraints_; |
223 | 226 |
224 DISALLOW_COPY_AND_ASSIGN(BrowserViewRenderer); | 227 DISALLOW_COPY_AND_ASSIGN(BrowserViewRenderer); |
225 }; | 228 }; |
226 | 229 |
227 } // namespace android_webview | 230 } // namespace android_webview |
228 | 231 |
229 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_ | 232 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_ |
OLD | NEW |