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

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

Issue 654403006: aw: Ensure invalidation when pipeline is stalled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: DidSkipCompositeInDraw Created 6 years, 2 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 | « no previous file | 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/parent_compositor_draw_constraints.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 gfx::Vector2dF current_fling_velocity) override; 134 gfx::Vector2dF current_fling_velocity) override;
135 135
136 // GlobalTileManagerClient overrides. 136 // GlobalTileManagerClient overrides.
137 virtual content::SynchronousCompositorMemoryPolicy GetMemoryPolicy() 137 virtual content::SynchronousCompositorMemoryPolicy GetMemoryPolicy()
138 const override; 138 const override;
139 virtual void SetMemoryPolicy( 139 virtual void SetMemoryPolicy(
140 content::SynchronousCompositorMemoryPolicy new_policy, 140 content::SynchronousCompositorMemoryPolicy new_policy,
141 bool effective_immediately) override; 141 bool effective_immediately) override;
142 142
143 void UpdateParentDrawConstraints(); 143 void UpdateParentDrawConstraints();
144 void DidSkipCommitFrame();
144 145
145 private: 146 private:
146 void SetTotalRootLayerScrollOffset(gfx::Vector2dF new_value_dip); 147 void SetTotalRootLayerScrollOffset(gfx::Vector2dF new_value_dip);
147 // Checks the continuous invalidate and block invalidate state, and schedule 148 // Checks the continuous invalidate and block invalidate state, and schedule
148 // invalidates appropriately. If |force_invalidate| is true, then send a view 149 // invalidates appropriately. If |force_invalidate| is true, then send a view
149 // invalidate regardless of compositor expectation. If |skip_reschedule_tick| 150 // invalidate regardless of compositor expectation. If |skip_reschedule_tick|
150 // is true and if there is already a pending fallback tick, don't reschedule 151 // is true and if there is already a pending fallback tick, don't reschedule
151 // them. 152 // them.
152 void EnsureContinuousInvalidation(bool force_invalidate, 153 void EnsureContinuousInvalidation(bool force_invalidate,
153 bool skip_reschedule_tick); 154 bool skip_reschedule_tick);
154 bool OnDrawSoftware(jobject java_canvas); 155 bool OnDrawSoftware(jobject java_canvas);
155 bool CompositeSW(SkCanvas* canvas); 156 bool CompositeSW(SkCanvas* canvas);
156 void DidComposite(); 157 void DidComposite();
157 void SkippedCompositeInDraw(); 158 void DidSkipCompositeInDraw();
158 scoped_refptr<base::debug::ConvertableToTraceFormat> RootLayerStateAsValue( 159 scoped_refptr<base::debug::ConvertableToTraceFormat> RootLayerStateAsValue(
159 const gfx::Vector2dF& total_scroll_offset_dip, 160 const gfx::Vector2dF& total_scroll_offset_dip,
160 const gfx::SizeF& scrollable_size_dip); 161 const gfx::SizeF& scrollable_size_dip);
161 162
162 bool OnDrawHardware(jobject java_canvas); 163 bool OnDrawHardware(jobject java_canvas);
163 scoped_ptr<cc::CompositorFrame> CompositeHw(); 164 scoped_ptr<cc::CompositorFrame> CompositeHw();
164 void ReturnUnusedResource(scoped_ptr<cc::CompositorFrame> frame); 165 void ReturnUnusedResource(scoped_ptr<cc::CompositorFrame> frame);
165 void ReturnResourceFromParent(); 166 void ReturnResourceFromParent();
166 167
167 // If we call up view invalidate and OnDraw is not called before a deadline, 168 // If we call up view invalidate and OnDraw is not called before a deadline,
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 // The draw constraints from the parent compositor. These are only used for 210 // The draw constraints from the parent compositor. These are only used for
210 // tiling priority. 211 // tiling priority.
211 ParentCompositorDrawConstraints parent_draw_constraints_; 212 ParentCompositorDrawConstraints parent_draw_constraints_;
212 213
213 // When true, we should continuously invalidate and keep drawing, for example 214 // When true, we should continuously invalidate and keep drawing, for example
214 // to drive animation. This value is set by the compositor and should always 215 // to drive animation. This value is set by the compositor and should always
215 // reflect the expectation of the compositor and not be reused for other 216 // reflect the expectation of the compositor and not be reused for other
216 // states. 217 // states.
217 bool compositor_needs_continuous_invalidate_; 218 bool compositor_needs_continuous_invalidate_;
218 219
220 bool invalidate_after_composite_;
221
219 // Used to block additional invalidates while one is already pending. 222 // Used to block additional invalidates while one is already pending.
220 bool block_invalidates_; 223 bool block_invalidates_;
221 224
222 base::CancelableClosure post_fallback_tick_; 225 base::CancelableClosure post_fallback_tick_;
223 base::CancelableClosure fallback_tick_fired_; 226 base::CancelableClosure fallback_tick_fired_;
224 bool fallback_tick_pending_; 227 bool fallback_tick_pending_;
225 228
226 int width_; 229 int width_;
227 int height_; 230 int height_;
228 231
(...skipping 10 matching lines...) Expand all
239 242
240 GlobalTileManager::Key tile_manager_key_; 243 GlobalTileManager::Key tile_manager_key_;
241 content::SynchronousCompositorMemoryPolicy memory_policy_; 244 content::SynchronousCompositorMemoryPolicy memory_policy_;
242 245
243 DISALLOW_COPY_AND_ASSIGN(BrowserViewRenderer); 246 DISALLOW_COPY_AND_ASSIGN(BrowserViewRenderer);
244 }; 247 };
245 248
246 } // namespace android_webview 249 } // namespace android_webview
247 250
248 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_ 251 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_
OLDNEW
« no previous file with comments | « no previous file | android_webview/browser/browser_view_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698