| Index: cc/trees/layer_tree_host.cc
|
| diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
|
| index eb543163e1ecb5fcab9a5f0dab52c0f9a9124ced..ea50df42dd2be5edffbb7d111d669aa3d8c168ba 100644
|
| --- a/cc/trees/layer_tree_host.cc
|
| +++ b/cc/trees/layer_tree_host.cc
|
| @@ -181,7 +181,8 @@ LayerTreeHost::~LayerTreeHost() {
|
|
|
| DCHECK(swap_promise_monitor_.empty());
|
|
|
| - BreakSwapPromises(SwapPromise::COMMIT_FAILS);
|
| + promises_.OnDidNotActivate(Promise::DidNotActivate::COMMIT_FAILS);
|
| + promises_.OnDidNotSwap(Promise::DidNotSwap::COMMIT_FAILS);
|
|
|
| if (proxy_) {
|
| DCHECK(proxy_->IsMainThread());
|
| @@ -333,7 +334,7 @@ void LayerTreeHost::FinishCommitOnImplThread(LayerTreeHostImpl* host_impl) {
|
| if (sync_tree->IsActiveTree())
|
| sync_tree->elastic_overscroll()->PushPendingToActive();
|
|
|
| - sync_tree->PassSwapPromises(&swap_promise_list_);
|
| + sync_tree->PassPromises(&promises_);
|
|
|
| sync_tree->set_top_controls_shrink_blink_size(
|
| top_controls_shrink_blink_size_);
|
| @@ -986,7 +987,7 @@ void LayerTreeHost::ApplyScrollAndScale(ScrollAndScaleSet* info) {
|
| "LatencyInfo.Flow",
|
| TRACE_ID_DONT_MANGLE(swap_promise->TraceId()),
|
| "Main thread scroll update");
|
| - QueueSwapPromise(swap_promise.Pass());
|
| + QueuePromise(swap_promise.Pass());
|
| }
|
|
|
| gfx::Vector2dF inner_viewport_scroll_delta;
|
| @@ -1234,15 +1235,17 @@ void LayerTreeHost::NotifySwapPromiseMonitorsOfSetNeedsCommit() {
|
| (*it)->OnSetNeedsCommitOnMain();
|
| }
|
|
|
| -void LayerTreeHost::QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise) {
|
| - DCHECK(swap_promise);
|
| - swap_promise_list_.push_back(swap_promise.Pass());
|
| +void LayerTreeHost::QueuePromise(scoped_ptr<Promise> promise) {
|
| + promises_.QueuePromise(promise.Pass());
|
| }
|
|
|
| -void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) {
|
| - for (size_t i = 0; i < swap_promise_list_.size(); i++)
|
| - swap_promise_list_[i]->DidNotSwap(reason);
|
| - swap_promise_list_.clear();
|
| +void LayerTreeHost::BreakSwapPromises(Promise::DidNotSwap::Reason reason) {
|
| + promises_.OnDidNotSwap(reason);
|
| +}
|
| +
|
| +void LayerTreeHost::BreakActivationPromises(
|
| + Promise::DidNotActivate::Reason reason) {
|
| + promises_.OnDidNotActivate(reason);
|
| }
|
|
|
| void LayerTreeHost::set_surface_id_namespace(uint32_t id_namespace) {
|
|
|