Index: android_webview/browser/browser_view_renderer.h |
diff --git a/android_webview/browser/browser_view_renderer.h b/android_webview/browser/browser_view_renderer.h |
index 784afb8714787f9da731153529c5cf04845ac7af..27d77f3785a2625948303a12ee9a1269cd3efb76 100644 |
--- a/android_webview/browser/browser_view_renderer.h |
+++ b/android_webview/browser/browser_view_renderer.h |
@@ -84,7 +84,7 @@ class BrowserViewRenderer : public content::SynchronousCompositorClient { |
content::SynchronousCompositor* compositor) override; |
void DidDestroyCompositor( |
content::SynchronousCompositor* compositor) override; |
- void SetContinuousInvalidate(bool invalidate) override; |
+ void PostInvalidate() override; |
void DidUpdateContent() override; |
gfx::Vector2dF GetTotalRootLayerScrollOffset() override; |
void UpdateRootLayerState(const gfx::Vector2dF& total_scroll_offset_dip, |
@@ -105,13 +105,12 @@ class BrowserViewRenderer : public content::SynchronousCompositorClient { |
private: |
void SetTotalRootLayerScrollOffset(gfx::Vector2dF new_value_dip); |
bool CanOnDraw(); |
- // Checks the continuous invalidate and block invalidate state, and schedule |
- // invalidates appropriately. If |force_invalidate| is true, then send a view |
- // invalidate regardless of compositor expectation. If |skip_reschedule_tick| |
- // is true and if there is already a pending fallback tick, don't reschedule |
- // them. |
- void EnsureContinuousInvalidation(bool force_invalidate, |
- bool skip_reschedule_tick); |
+ // Posts an invalidate with fallback tick. All invalidates posted while an |
+ // invalidate is pending will be posted as a single invalidate after the |
+ // pending invalidate is done. If |skip_reschedule_tick| is true a fallback |
+ // tick won't be scheduled if there's one already pending. |
+ void PostInvalidateWithFallback(bool skip_reschedule_tick); |
+ void UpdateCompositorIsActive(); |
bool CompositeSW(SkCanvas* canvas); |
void DidComposite(); |
void DidSkipCompositeInDraw(); |
@@ -120,6 +119,7 @@ class BrowserViewRenderer : public content::SynchronousCompositorClient { |
const gfx::SizeF& scrollable_size_dip); |
scoped_ptr<cc::CompositorFrame> CompositeHw(); |
+ void ForceCompositeHw(); |
void ReturnUnusedResource(scoped_ptr<cc::CompositorFrame> frame); |
void ReturnResourceFromParent(); |
@@ -138,6 +138,7 @@ class BrowserViewRenderer : public content::SynchronousCompositorClient { |
gfx::Vector2d max_scroll_offset() const; |
size_t CalculateDesiredMemoryPolicy(); |
+ |
// For debug tracing or logging. Return the string representation of this |
// view renderer's state. |
std::string ToString() const; |
@@ -165,15 +166,10 @@ class BrowserViewRenderer : public content::SynchronousCompositorClient { |
// tiling priority. |
ParentCompositorDrawConstraints parent_draw_constraints_; |
- // When true, we should continuously invalidate and keep drawing, for example |
- // to drive animation. This value is set by the compositor and should always |
- // reflect the expectation of the compositor and not be reused for other |
- // states. |
- bool compositor_needs_continuous_invalidate_; |
- |
+ // Used to run invalidate after the pending invalidate is done. |
bool invalidate_after_composite_; |
- // Used to block additional invalidates while one is already pending. |
+ // Used to block additional invalidates while one is pending. |
bool block_invalidates_; |
base::CancelableClosure post_fallback_tick_; |