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

Unified Diff: cc/trees/layer_tree_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/trees/layer_tree_impl.h ('k') | cc/trees/layer_tree_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 3a475e110ff5bec9e56315a035f3a5a68f113d6e..b88e305669c0d8c771c797d86d67ee8e8df80b37 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -1515,10 +1515,17 @@ void LayerTreeImpl::AppendSwapPromises(
void LayerTreeImpl::FinishSwapPromises(CompositorFrameMetadata* metadata) {
for (const auto& swap_promise : swap_promise_list_)
- swap_promise->DidSwap(metadata);
+ swap_promise->WillSwap(metadata);
+ for (const auto& swap_promise : pinned_swap_promise_list_)
+ swap_promise->WillSwap(metadata);
+}
+
+void LayerTreeImpl::ClearSwapPromises() {
+ for (const auto& swap_promise : swap_promise_list_)
+ swap_promise->DidSwap();
swap_promise_list_.clear();
for (const auto& swap_promise : pinned_swap_promise_list_)
- swap_promise->DidSwap(metadata);
+ swap_promise->DidSwap();
pinned_swap_promise_list_.clear();
}
« no previous file with comments | « cc/trees/layer_tree_impl.h ('k') | cc/trees/layer_tree_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698