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