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

Unified Diff: cc/trees/layer_tree_impl.h

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: Use different return value for failed draw in test, to avoid NOTREACHED() 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
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | cc/trees/layer_tree_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_impl.h
diff --git a/cc/trees/layer_tree_impl.h b/cc/trees/layer_tree_impl.h
index 47b6351ca6f8d7bdc1b503cc2ec77a5e63d4afc6..5b69fb7a105392ed06c3981316082a0aba08dafd 100644
--- a/cc/trees/layer_tree_impl.h
+++ b/cc/trees/layer_tree_impl.h
@@ -285,8 +285,26 @@ class CC_EXPORT LayerTreeImpl {
// Call this function when you expect there to be a swap buffer.
// See swap_promise.h for how to use SwapPromise.
+ //
+ // A swap promise queued by QueueSwapPromise travels with the layer
+ // information currently associated with the tree. For example, when
+ // a pending tree is activated, the swap promise is passed to the
+ // active tree along with the layer information. Similarly, when a
+ // new activation overwrites layer information on the active tree,
+ // queued swap promises are broken.
void QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise);
+ // Queue a swap promise, pinned to this tree. Pinned swap promises
+ // may only be queued on the active tree.
+ //
+ // An active tree pinned swap promise will see only DidSwap() or
+ // DidNotSwap(SWAP_FAILS). No DidActivate() will be seen because
+ // that has already happened prior to queueing of the swap promise.
+ //
+ // Pinned active tree swap promises will not be broken prematurely
+ // on the active tree if a new tree is activated.
+ void QueuePinnedSwapPromise(scoped_ptr<SwapPromise> swap_promise);
+
// Take the |new_swap_promise| and append it to |swap_promise_list_|.
void PassSwapPromises(ScopedPtrVector<SwapPromise>* new_swap_promise);
void FinishSwapPromises(CompositorFrameMetadata* metadata);
@@ -446,6 +464,7 @@ class CC_EXPORT LayerTreeImpl {
bool has_ever_been_drawn_;
ScopedPtrVector<SwapPromise> swap_promise_list_;
+ ScopedPtrVector<SwapPromise> pinned_swap_promise_list_;
UIResourceRequestQueue ui_resource_request_queue_;
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | cc/trees/layer_tree_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698