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

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

Issue 394113002: Tiling priorities in Android Webview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: better fix Created 6 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
« no previous file with comments | « android_webview/android_webview.gyp ('k') | android_webview/browser/browser_view_renderer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "android_webview/browser/global_tile_manager.h" 8 #include "android_webview/browser/global_tile_manager.h"
9 #include "android_webview/browser/global_tile_manager_client.h" 9 #include "android_webview/browser/global_tile_manager_client.h"
10 #include "android_webview/browser/parent_compositor_draw_constraints.h"
10 #include "android_webview/browser/shared_renderer_state.h" 11 #include "android_webview/browser/shared_renderer_state.h"
11 #include "base/android/scoped_java_ref.h" 12 #include "base/android/scoped_java_ref.h"
12 #include "base/callback.h" 13 #include "base/callback.h"
13 #include "base/cancelable_callback.h" 14 #include "base/cancelable_callback.h"
14 #include "base/values.h" 15 #include "base/values.h"
15 #include "content/public/browser/android/synchronous_compositor.h" 16 #include "content/public/browser/android/synchronous_compositor.h"
16 #include "content/public/browser/android/synchronous_compositor_client.h" 17 #include "content/public/browser/android/synchronous_compositor_client.h"
17 #include "skia/ext/refptr.h" 18 #include "skia/ext/refptr.h"
18 #include "ui/gfx/rect.h" 19 #include "ui/gfx/rect.h"
19 #include "ui/gfx/vector2d_f.h" 20 #include "ui/gfx/vector2d_f.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 virtual bool IsExternalFlingActive() const OVERRIDE; 134 virtual bool IsExternalFlingActive() const OVERRIDE;
134 virtual void DidOverscroll(gfx::Vector2dF accumulated_overscroll, 135 virtual void DidOverscroll(gfx::Vector2dF accumulated_overscroll,
135 gfx::Vector2dF latest_overscroll_delta, 136 gfx::Vector2dF latest_overscroll_delta,
136 gfx::Vector2dF current_fling_velocity) OVERRIDE; 137 gfx::Vector2dF current_fling_velocity) OVERRIDE;
137 138
138 // GlobalTileManagerClient overrides. 139 // GlobalTileManagerClient overrides.
139 virtual size_t GetNumTiles() const OVERRIDE; 140 virtual size_t GetNumTiles() const OVERRIDE;
140 virtual void SetNumTiles(size_t num_tiles, 141 virtual void SetNumTiles(size_t num_tiles,
141 bool effective_immediately) OVERRIDE; 142 bool effective_immediately) OVERRIDE;
142 143
144 void UpdateParentDrawConstraints();
145
143 private: 146 private:
144 void SetTotalRootLayerScrollOffset(gfx::Vector2dF new_value_dip); 147 void SetTotalRootLayerScrollOffset(gfx::Vector2dF new_value_dip);
145 // Checks the continuous invalidate and block invalidate state, and schedule 148 // Checks the continuous invalidate and block invalidate state, and schedule
146 // invalidates appropriately. If |force_invalidate| is true, then send a view 149 // invalidates appropriately. If |force_invalidate| is true, then send a view
147 // invalidate regardless of compositor expectation. 150 // invalidate regardless of compositor expectation.
148 void EnsureContinuousInvalidation(bool force_invalidate); 151 void EnsureContinuousInvalidation(bool force_invalidate);
149 bool OnDrawSoftware(jobject java_canvas); 152 bool OnDrawSoftware(jobject java_canvas);
150 bool CompositeSW(SkCanvas* canvas); 153 bool CompositeSW(SkCanvas* canvas);
151 void DidComposite(); 154 void DidComposite();
152 scoped_ptr<base::Value> RootLayerStateAsValue( 155 scoped_ptr<base::Value> RootLayerStateAsValue(
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 bool attached_to_window_; 195 bool attached_to_window_;
193 bool hardware_enabled_; 196 bool hardware_enabled_;
194 float dip_scale_; 197 float dip_scale_;
195 float page_scale_factor_; 198 float page_scale_factor_;
196 bool on_new_picture_enable_; 199 bool on_new_picture_enable_;
197 bool clear_view_; 200 bool clear_view_;
198 201
199 gfx::Vector2d last_on_draw_scroll_offset_; 202 gfx::Vector2d last_on_draw_scroll_offset_;
200 gfx::Rect last_on_draw_global_visible_rect_; 203 gfx::Rect last_on_draw_global_visible_rect_;
201 204
205 // The draw constraints from the parent compositor. These are only used for
206 // tiling priority.
207 ParentCompositorDrawConstraints parent_draw_constraints_;
208
202 // When true, we should continuously invalidate and keep drawing, for example 209 // When true, we should continuously invalidate and keep drawing, for example
203 // to drive animation. This value is set by the compositor and should always 210 // to drive animation. This value is set by the compositor and should always
204 // reflect the expectation of the compositor and not be reused for other 211 // reflect the expectation of the compositor and not be reused for other
205 // states. 212 // states.
206 bool compositor_needs_continuous_invalidate_; 213 bool compositor_needs_continuous_invalidate_;
207 214
208 // Used to block additional invalidates while one is already pending. 215 // Used to block additional invalidates while one is already pending.
209 bool block_invalidates_; 216 bool block_invalidates_;
210 217
211 base::CancelableClosure post_fallback_tick_; 218 base::CancelableClosure post_fallback_tick_;
(...skipping 20 matching lines...) Expand all
232 // policy on the shared_renderer_state_ atomically. 239 // policy on the shared_renderer_state_ atomically.
233 size_t num_tiles_; 240 size_t num_tiles_;
234 size_t num_bytes_; 241 size_t num_bytes_;
235 242
236 DISALLOW_COPY_AND_ASSIGN(BrowserViewRenderer); 243 DISALLOW_COPY_AND_ASSIGN(BrowserViewRenderer);
237 }; 244 };
238 245
239 } // namespace android_webview 246 } // namespace android_webview
240 247
241 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_ 248 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_
OLDNEW
« no previous file with comments | « android_webview/android_webview.gyp ('k') | android_webview/browser/browser_view_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698