| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "cc/trees/layer_tree_impl.h" | 5 #include "cc/trees/layer_tree_impl.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 958 } | 958 } |
| 959 | 959 |
| 960 void LayerTreeImpl::QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise) { | 960 void LayerTreeImpl::QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise) { |
| 961 DCHECK(swap_promise); | 961 DCHECK(swap_promise); |
| 962 swap_promise_list_.push_back(swap_promise.Pass()); | 962 swap_promise_list_.push_back(swap_promise.Pass()); |
| 963 } | 963 } |
| 964 | 964 |
| 965 void LayerTreeImpl::PassSwapPromises( | 965 void LayerTreeImpl::PassSwapPromises( |
| 966 ScopedPtrVector<SwapPromise>* new_swap_promise) { | 966 ScopedPtrVector<SwapPromise>* new_swap_promise) { |
| 967 swap_promise_list_.insert_and_take(swap_promise_list_.end(), | 967 swap_promise_list_.insert_and_take(swap_promise_list_.end(), |
| 968 *new_swap_promise); | 968 new_swap_promise); |
| 969 new_swap_promise->clear(); | 969 new_swap_promise->clear(); |
| 970 } | 970 } |
| 971 | 971 |
| 972 void LayerTreeImpl::FinishSwapPromises(CompositorFrameMetadata* metadata) { | 972 void LayerTreeImpl::FinishSwapPromises(CompositorFrameMetadata* metadata) { |
| 973 for (size_t i = 0; i < swap_promise_list_.size(); i++) | 973 for (size_t i = 0; i < swap_promise_list_.size(); i++) |
| 974 swap_promise_list_[i]->DidSwap(metadata); | 974 swap_promise_list_[i]->DidSwap(metadata); |
| 975 swap_promise_list_.clear(); | 975 swap_promise_list_.clear(); |
| 976 } | 976 } |
| 977 | 977 |
| 978 void LayerTreeImpl::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { | 978 void LayerTreeImpl::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1421 | 1421 |
| 1422 void LayerTreeImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { | 1422 void LayerTreeImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { |
| 1423 layer_tree_host_impl_->UnregisterPictureLayerImpl(layer); | 1423 layer_tree_host_impl_->UnregisterPictureLayerImpl(layer); |
| 1424 } | 1424 } |
| 1425 | 1425 |
| 1426 void LayerTreeImpl::InputScrollAnimationFinished() { | 1426 void LayerTreeImpl::InputScrollAnimationFinished() { |
| 1427 layer_tree_host_impl_->ScrollEnd(); | 1427 layer_tree_host_impl_->ScrollEnd(); |
| 1428 } | 1428 } |
| 1429 | 1429 |
| 1430 } // namespace cc | 1430 } // namespace cc |
| OLD | NEW |