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

Unified Diff: cc/trees/latency_info_swap_promise_monitor.cc

Issue 1292773003: Queue latency info swap promises in a separate already-active queue. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add unittest for surface layer swap promise resolution when activations occur but swaps do not. Created 5 years, 4 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
Index: cc/trees/latency_info_swap_promise_monitor.cc
diff --git a/cc/trees/latency_info_swap_promise_monitor.cc b/cc/trees/latency_info_swap_promise_monitor.cc
index 6e9c57e04231de38b459c04c7705fff827aa335f..1dc6ef8856f5408b6d511ccb509392273182535a 100644
--- a/cc/trees/latency_info_swap_promise_monitor.cc
+++ b/cc/trees/latency_info_swap_promise_monitor.cc
@@ -59,7 +59,12 @@ void LatencyInfoSwapPromiseMonitor::OnSetNeedsCommitOnMain() {
void LatencyInfoSwapPromiseMonitor::OnSetNeedsRedrawOnImpl() {
if (AddRenderingScheduledComponent(latency_, false /* on_main */)) {
scoped_ptr<SwapPromise> swap_promise(new LatencyInfoSwapPromise(*latency_));
- layer_tree_host_impl_->active_tree()->QueueSwapPromise(swap_promise.Pass());
+ // Queue a pinned swap promise on the active tree. This will allow
+ // measurement of the time to the next SwapBuffers().The swap
danakj 2015/08/25 21:37:30 space after period
Tobias Sargeant 2015/08/26 11:06:49 Done.
+ // promise is pinned so that it is not interrupted by new incoming
+ // activations (which would otherwise break the swap promise).
+ layer_tree_host_impl_->active_tree()->QueuePinnedSwapPromise(
+ swap_promise.Pass());
}
}

Powered by Google App Engine
This is Rietveld 408576698