| 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 void RemoveCompositorFrameConsumer( | 138 void RemoveCompositorFrameConsumer( |
| 139 CompositorFrameConsumer* compositor_frame_consumer) override; | 139 CompositorFrameConsumer* compositor_frame_consumer) override; |
| 140 | 140 |
| 141 void SetActiveCompositorID(const CompositorID& compositor_id); | 141 void SetActiveCompositorID(const CompositorID& compositor_id); |
| 142 | 142 |
| 143 // Visible for testing. | 143 // Visible for testing. |
| 144 content::SynchronousCompositor* GetActiveCompositorForTesting() const { | 144 content::SynchronousCompositor* GetActiveCompositorForTesting() const { |
| 145 return compositor_; | 145 return compositor_; |
| 146 } | 146 } |
| 147 | 147 |
| 148 bool window_visible_for_tests() const { return window_visible_; } |
| 149 |
| 148 private: | 150 private: |
| 149 void SetTotalRootLayerScrollOffset(const gfx::Vector2dF& new_value_dip); | 151 void SetTotalRootLayerScrollOffset(const gfx::Vector2dF& new_value_dip); |
| 150 bool CanOnDraw(); | 152 bool CanOnDraw(); |
| 151 bool CompositeSW(SkCanvas* canvas); | 153 bool CompositeSW(SkCanvas* canvas); |
| 152 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> | 154 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> |
| 153 RootLayerStateAsValue(const gfx::Vector2dF& total_scroll_offset_dip, | 155 RootLayerStateAsValue(const gfx::Vector2dF& total_scroll_offset_dip, |
| 154 const gfx::SizeF& scrollable_size_dip); | 156 const gfx::SizeF& scrollable_size_dip); |
| 155 | 157 |
| 156 void ReturnUncommittedFrames(ChildFrameQueue frame); | 158 void ReturnUncommittedFrames(ChildFrameQueue frame); |
| 157 void ReturnUnusedResource(std::unique_ptr<ChildFrame> frame); | 159 void ReturnUnusedResource(std::unique_ptr<ChildFrame> frame); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 186 // a compositor is destroyed. | 188 // a compositor is destroyed. |
| 187 std::map<CompositorID, | 189 std::map<CompositorID, |
| 188 content::SynchronousCompositor*, | 190 content::SynchronousCompositor*, |
| 189 CompositorIDComparator> | 191 CompositorIDComparator> |
| 190 compositor_map_; | 192 compositor_map_; |
| 191 | 193 |
| 192 bool is_paused_; | 194 bool is_paused_; |
| 193 bool view_visible_; | 195 bool view_visible_; |
| 194 bool window_visible_; // Only applicable if |attached_to_window_| is true. | 196 bool window_visible_; // Only applicable if |attached_to_window_| is true. |
| 195 bool attached_to_window_; | 197 bool attached_to_window_; |
| 198 bool was_attached_; // Whether the view was attached to window at least once. |
| 196 bool hardware_enabled_; | 199 bool hardware_enabled_; |
| 197 float dip_scale_; | 200 float dip_scale_; |
| 198 float page_scale_factor_; | 201 float page_scale_factor_; |
| 199 float min_page_scale_factor_; | 202 float min_page_scale_factor_; |
| 200 float max_page_scale_factor_; | 203 float max_page_scale_factor_; |
| 201 bool on_new_picture_enable_; | 204 bool on_new_picture_enable_; |
| 202 bool clear_view_; | 205 bool clear_view_; |
| 203 | 206 |
| 204 bool offscreen_pre_raster_; | 207 bool offscreen_pre_raster_; |
| 205 | 208 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 233 gfx::Vector2dF overscroll_rounding_error_; | 236 gfx::Vector2dF overscroll_rounding_error_; |
| 234 | 237 |
| 235 ParentCompositorDrawConstraints external_draw_constraints_; | 238 ParentCompositorDrawConstraints external_draw_constraints_; |
| 236 | 239 |
| 237 DISALLOW_COPY_AND_ASSIGN(BrowserViewRenderer); | 240 DISALLOW_COPY_AND_ASSIGN(BrowserViewRenderer); |
| 238 }; | 241 }; |
| 239 | 242 |
| 240 } // namespace android_webview | 243 } // namespace android_webview |
| 241 | 244 |
| 242 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_ | 245 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_ |
| OLD | NEW |