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

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: Remove the concept of pinned promises on the pending tree. DCHECK if one is created. 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/layer_tree_impl.h
diff --git a/cc/trees/layer_tree_impl.h b/cc/trees/layer_tree_impl.h
index 47b6351ca6f8d7bdc1b503cc2ec77a5e63d4afc6..176624316a04901be8d374a17d54b890f2eb3463 100644
--- a/cc/trees/layer_tree_impl.h
+++ b/cc/trees/layer_tree_impl.h
@@ -285,8 +285,30 @@ 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. A pinned swap promise
+ // will not be passed from the pending tree to the active tree upon
+ // activation, and will not be broken prematurely on the active tree
+ // if a new tree is activated.
+ //
+ // Thus, a pinned swap promise on a pending tree will only see
danakj 2015/08/27 17:52:54 Update this comment then about the pending tree pl
Tobias Sargeant 2015/08/28 10:58:09 Done.
+ // DidActivate() or DidNotSwap(ACTIVATION_FAILS). It is not passed
+ // to the active tree, so it will not swap.
+ //
+ // A pinned swap promise on the active tree will either see only
+ // DidSwap() or DidNotSwap(SWAP_FAILS). No DidActivate() will be
+ // seen because that has already happened prior to queueing of the
+ // swap promise.
+ 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 +468,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_;

Powered by Google App Engine
This is Rietveld 408576698