Index: cc/trees/thread_proxy.cc |
diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc |
index d1c44712c33643e15e009eb7b28497b470949676..5f92c61099806816bf8b353462a724fed9ab9e85 100644 |
--- a/cc/trees/thread_proxy.cc |
+++ b/cc/trees/thread_proxy.cc |
@@ -384,21 +384,6 @@ void ThreadProxy::SetNeedsCommitOnImplThread() { |
scheduler_on_impl_thread_->SetNeedsCommit(); |
} |
-void ThreadProxy::SetNeedsManageTilesOnImplThread() { |
- if (manage_tiles_pending_) |
- return; |
- Proxy::ImplThread()->PostTask( |
- base::Bind(&ThreadProxy::ManageTilesOnImplThread, impl_thread_weak_ptr_)); |
- manage_tiles_pending_ = true; |
-} |
- |
-void ThreadProxy::ManageTilesOnImplThread() { |
- // TODO(nduca): If needed, move this into CCSchedulerStateMachine. |
- manage_tiles_pending_ = false; |
- if (layer_tree_host_impl_) |
- layer_tree_host_impl_->ManageTiles(); |
-} |
- |
void ThreadProxy::PostAnimationEventsToMainThreadOnImplThread( |
scoped_ptr<AnimationEventsVector> events, |
base::Time wall_clock_time) { |
@@ -986,6 +971,12 @@ ThreadProxy::ScheduledActionDrawAndSwapInternal(bool forced_draw) { |
if (draw_frame) |
CheckOutputSurfaceStatusOnImplThread(); |
+ // Update the tile state after drawing. This prevents manage tiles from |
+ // being in the critical path for getting things on screen, but still |
+ // makes sure that tile state is updated on a semi-regular basis. |
+ if (layer_tree_host_impl_->settings().impl_side_painting) |
+ layer_tree_host_impl_->ManageTiles(); |
+ |
return result; |
} |