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 |
+ // 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_; |