| 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_host.h" | 5 #include "cc/trees/layer_tree_host.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <stack> | 8 #include <stack> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 | 135 |
| 136 void LayerTreeHost::InitializeForTesting(scoped_ptr<Proxy> proxy_for_testing) { | 136 void LayerTreeHost::InitializeForTesting(scoped_ptr<Proxy> proxy_for_testing) { |
| 137 InitializeProxy(proxy_for_testing.Pass()); | 137 InitializeProxy(proxy_for_testing.Pass()); |
| 138 } | 138 } |
| 139 | 139 |
| 140 void LayerTreeHost::InitializeProxy(scoped_ptr<Proxy> proxy) { | 140 void LayerTreeHost::InitializeProxy(scoped_ptr<Proxy> proxy) { |
| 141 TRACE_EVENT0("cc", "LayerTreeHost::InitializeForReal"); | 141 TRACE_EVENT0("cc", "LayerTreeHost::InitializeForReal"); |
| 142 | 142 |
| 143 proxy_ = proxy.Pass(); | 143 proxy_ = proxy.Pass(); |
| 144 proxy_->Start(); | 144 proxy_->Start(); |
| 145 if (settings_.accelerated_animation_enabled) { |
| 146 animation_registrar_->set_supports_scroll_animations( |
| 147 proxy_->SupportsImplScrolling()); |
| 148 } |
| 145 } | 149 } |
| 146 | 150 |
| 147 LayerTreeHost::~LayerTreeHost() { | 151 LayerTreeHost::~LayerTreeHost() { |
| 148 TRACE_EVENT0("cc", "LayerTreeHost::~LayerTreeHost"); | 152 TRACE_EVENT0("cc", "LayerTreeHost::~LayerTreeHost"); |
| 149 | 153 |
| 150 overhang_ui_resource_.reset(); | 154 overhang_ui_resource_.reset(); |
| 151 | 155 |
| 152 if (root_layer_.get()) | 156 if (root_layer_.get()) |
| 153 root_layer_->SetLayerTreeHost(NULL); | 157 root_layer_->SetLayerTreeHost(NULL); |
| 154 | 158 |
| (...skipping 1100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1255 swap_promise_list_.push_back(swap_promise.Pass()); | 1259 swap_promise_list_.push_back(swap_promise.Pass()); |
| 1256 } | 1260 } |
| 1257 | 1261 |
| 1258 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { | 1262 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { |
| 1259 for (size_t i = 0; i < swap_promise_list_.size(); i++) | 1263 for (size_t i = 0; i < swap_promise_list_.size(); i++) |
| 1260 swap_promise_list_[i]->DidNotSwap(reason); | 1264 swap_promise_list_[i]->DidNotSwap(reason); |
| 1261 swap_promise_list_.clear(); | 1265 swap_promise_list_.clear(); |
| 1262 } | 1266 } |
| 1263 | 1267 |
| 1264 } // namespace cc | 1268 } // namespace cc |
| OLD | NEW |