Index: cc/trees/thread_proxy.cc |
diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc |
index dda25ecb79ad4b24337fa6a00cda38c3bbd4b5e6..9ea78b1ce7700f018ca4d659367c3a9c0ad9837f 100644 |
--- a/cc/trees/thread_proxy.cc |
+++ b/cc/trees/thread_proxy.cc |
@@ -549,10 +549,17 @@ void ThreadProxy::SetNeedsRedrawRectOnImplThread(gfx::Rect damage_rect) { |
SetNeedsRedrawOnImplThread(); |
} |
-void ThreadProxy::DidSwapUseIncompleteTileOnImplThread() { |
+void ThreadProxy::SetSwapUsedIncompleteTileOnImplThread( |
+ bool used_incomplete_tile) { |
DCHECK(IsImplThread()); |
- TRACE_EVENT0("cc", "ThreadProxy::DidSwapUseIncompleteTileOnImplThread"); |
- scheduler_on_impl_thread_->DidSwapUseIncompleteTile(); |
+ if (used_incomplete_tile) { |
+ TRACE_EVENT_INSTANT0( |
+ "cc", |
+ "ThreadProxy::SetSwapUsedIncompleteTileOnImplThread", |
+ TRACE_EVENT_SCOPE_THREAD); |
+ } |
+ scheduler_on_impl_thread_->SetSwapUsedIncompleteTile( |
+ used_incomplete_tile); |
} |
void ThreadProxy::DidInitializeVisibleTileOnImplThread() { |
@@ -1087,8 +1094,10 @@ ThreadProxy::ScheduledActionDrawAndSwapInternal(bool forced_draw) { |
} else if (draw_frame) { |
result.did_swap = layer_tree_host_impl_->SwapBuffers(frame); |
- if (frame.contains_incomplete_tile) |
- DidSwapUseIncompleteTileOnImplThread(); |
+ if (result.did_swap) { |
+ DCHECK(!frame.has_no_damage); |
+ SetSwapUsedIncompleteTileOnImplThread(frame.contains_incomplete_tile); |
+ } |
} |
// Tell the main thread that the the newly-commited frame was drawn. |