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

Unified Diff: cc/trees/single_thread_proxy.cc

Issue 60513007: Add SwapPromise support to LayerTreeHost and LayerTreeImpl (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rework SwapPromise() interface to have virtual DidSwap() & DidNotSwap() interface Created 7 years, 1 month 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
Index: cc/trees/single_thread_proxy.cc
diff --git a/cc/trees/single_thread_proxy.cc b/cc/trees/single_thread_proxy.cc
index 671a53b15e5e9ef89c9861ccbd5431ac6013cf97..ec11502aadd63f17e06cfab5cabd45d6935c300e 100644
--- a/cc/trees/single_thread_proxy.cc
+++ b/cc/trees/single_thread_proxy.cc
@@ -392,7 +392,12 @@ void SingleThreadProxy::CompositeImmediately(base::TimeTicks frame_begin_time) {
// the swap buffers will execute first.
BlockingTaskRunner::CapturePostTasks blocked;
- layer_tree_host_impl_->SwapBuffers(frame);
+ bool did_swap = layer_tree_host_impl_->SwapBuffers(frame);
+ if (did_swap)
+ layer_tree_host_impl_->active_tree()->FinishSwapPromise();
danakj 2013/11/13 23:22:09 Why doesn't LTHI do this directly inside SwapBuffe
Yufeng Shen (Slow to review) 2013/11/14 22:09:55 Done.
+ else
+ layer_tree_host_impl_->active_tree()->BreakSwapPromise(
+ SwapPromise::SWAP_FAILS);
}
DidSwapFrame();
}

Powered by Google App Engine
This is Rietveld 408576698