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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 2580493002: Splitting DidSwap in cc::SwapPromise into WillSwap and DidSwap (Closed)
Patch Set: x Created 4 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 | « cc/output/swap_promise.h ('k') | cc/trees/layer_tree_host_unittest.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 de50e70ea351370c82a80dde3788be6b893962c6..4aa714074ce6f7b299b87be9c3123b5d4da58df3 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1666,6 +1666,10 @@ bool LayerTreeHostImpl::DrawLayers(FrameData* frame) {
compositor_frame.render_pass_list = std::move(frame->render_passes);
compositor_frame_sink_->SubmitCompositorFrame(std::move(compositor_frame));
+ // Clears the list of swap promises after calling DidSwap on each of them to
+ // signal that the swap is over.
+ active_tree()->ClearSwapPromises();
+
// The next frame should start by assuming nothing has changed, and changes
// are noted as they occur.
// TODO(boliu): If we did a temporary software renderer frame, propogate the
« no previous file with comments | « cc/output/swap_promise.h ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698