cc: Call ManageTiles explicitly
ManageTiles used to be scheduled as a post task to run "whenever". This was
fine back when activation checks used the exact state of the tree. However,
now that activation has been moved to tile manager, ManageTiles is now
responsible for keeping the activation check up to date and needs
to be called immediately after commit to makes sure that new work has been
marked as required.
Before this patch, ManageTiles would generally run after commits and after
drawing due to the nature of scheduling. This patch keeps that behavior by
doing a ManageTiles after a commit and after drawing.
[email protected]
BUG=243531
Review URL: https://chromiumcodereview.appspot.com/15855008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204923 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/cc/trees/layer_tree_host_impl.h b/cc/trees/layer_tree_host_impl.h
index fee3f466..9c5ae5b 100644
--- a/cc/trees/layer_tree_host_impl.h
+++ b/cc/trees/layer_tree_host_impl.h
@@ -64,7 +64,6 @@
virtual void SetNeedsRedrawRectOnImplThread(gfx::Rect damage_rect) = 0;
virtual void DidInitializeVisibleTileOnImplThread() = 0;
virtual void SetNeedsCommitOnImplThread() = 0;
- virtual void SetNeedsManageTilesOnImplThread() = 0;
virtual void PostAnimationEventsToMainThreadOnImplThread(
scoped_ptr<AnimationEventsVector> events,
base::Time wall_clock_time) = 0;
@@ -197,7 +196,6 @@
virtual bool AllowPartialSwap() const OVERRIDE;
// TileManagerClient implementation.
- virtual void ScheduleManageTiles() OVERRIDE;
virtual void DidInitializeVisibleTile() OVERRIDE;
virtual bool ShouldForceTileUploadsRequiredForActivationToComplete() const
OVERRIDE;
@@ -236,6 +234,7 @@
virtual bool SwapBuffers(const FrameData& frame);
void SetNeedsBeginFrame(bool enable);
+ void SetNeedsManageTiles() { manage_tiles_needed_ = true; }
void Readback(void* pixels, gfx::Rect rect_in_device_viewport);
@@ -466,6 +465,9 @@
bool did_lock_scrolling_layer_;
bool should_bubble_scrolls_;
bool wheel_scrolling_;
+
+ bool manage_tiles_needed_;
+
// The optional delegate for the root layer scroll offset.
LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_;
LayerTreeSettings settings_;