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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 1493013002: cc: Force commit on the frame after a copy request (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: s/CommitAndDrawFrame/Commit/g Created 5 years 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 | « no previous file | cc/trees/layer_tree_host_unittest_copyrequest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 0ce5d0e0cf526aa3885d15b1aba47b2cf9d0584c..c87f801e6ee20e8858ad8978daa70580e1a8941f 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1067,6 +1067,14 @@ DrawResult LayerTreeHostImpl::CalculateRenderPasses(
// trigger this DCHECK.
DCHECK(!have_copy_request || draw_result == DRAW_SUCCESS);
+ // TODO(crbug.com/564832): This workaround to prevent creating unnecessarily
+ // persistent render passes. When a copy request is made, it may force a
+ // separate render pass for the layer, which will persist until a new commit
+ // removes it. Force a commit after copy requests, to remove extra render
+ // passes.
+ if (have_copy_request)
+ client_->SetNeedsCommitOnImplThread();
+
return draw_result;
}
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_unittest_copyrequest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698