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

Unified Diff: cc/trees/thread_proxy.cc

Issue 23686011: CC: Fix missing swap-used-incomplete-tile updates (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/thread_proxy.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/thread_proxy.cc
diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc
index 288ec43f0be34298dcc6f4b9fcf75e5234158ea9..5c6533a43745501937d9987bf48cff0cd98263ef 100644
--- a/cc/trees/thread_proxy.cc
+++ b/cc/trees/thread_proxy.cc
@@ -544,10 +544,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,11 @@ DrawSwapReadbackResult ThreadProxy::DrawSwapReadbackInternal(
DCHECK(swap_requested);
result.did_swap = layer_tree_host_impl_->SwapBuffers(frame);
- if (frame.contains_incomplete_tile)
- DidSwapUseIncompleteTileOnImplThread();
+ // We don't know if we have incomplete tiles if we didn't actually swap.
+ 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.
« no previous file with comments | « cc/trees/thread_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698