| 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/layer_tree_impl.h" | 5 #include "cc/layer_tree_impl.h" |
| 6 | 6 |
| 7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
| 8 #include "cc/layer_tree_host_common.h" | 8 #include "cc/layer_tree_host_common.h" |
| 9 #include "cc/layer_tree_host_impl.h" | 9 #include "cc/layer_tree_host_impl.h" |
| 10 #include "ui/gfx/vector2d_conversions.h" | 10 #include "ui/gfx/vector2d_conversions.h" |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 void LayerTreeImpl::SetContentsTexturesPurged() { | 227 void LayerTreeImpl::SetContentsTexturesPurged() { |
| 228 contents_textures_purged_ = true; | 228 contents_textures_purged_ = true; |
| 229 layer_tree_host_impl_->OnCanDrawStateChangedForTree(this); | 229 layer_tree_host_impl_->OnCanDrawStateChangedForTree(this); |
| 230 } | 230 } |
| 231 | 231 |
| 232 void LayerTreeImpl::ResetContentsTexturesPurged() { | 232 void LayerTreeImpl::ResetContentsTexturesPurged() { |
| 233 contents_textures_purged_ = false; | 233 contents_textures_purged_ = false; |
| 234 layer_tree_host_impl_->OnCanDrawStateChangedForTree(this); | 234 layer_tree_host_impl_->OnCanDrawStateChangedForTree(this); |
| 235 } | 235 } |
| 236 | 236 |
| 237 Proxy* LayerTreeImpl::proxy() const { |
| 238 return layer_tree_host_impl_->proxy(); |
| 239 } |
| 240 |
| 237 const LayerTreeSettings& LayerTreeImpl::settings() const { | 241 const LayerTreeSettings& LayerTreeImpl::settings() const { |
| 238 return layer_tree_host_impl_->settings(); | 242 return layer_tree_host_impl_->settings(); |
| 239 } | 243 } |
| 240 | 244 |
| 241 OutputSurface* LayerTreeImpl::output_surface() const { | 245 OutputSurface* LayerTreeImpl::output_surface() const { |
| 242 return layer_tree_host_impl_->outputSurface(); | 246 return layer_tree_host_impl_->outputSurface(); |
| 243 } | 247 } |
| 244 | 248 |
| 245 ResourceProvider* LayerTreeImpl::resource_provider() const { | 249 ResourceProvider* LayerTreeImpl::resource_provider() const { |
| 246 return layer_tree_host_impl_->resourceProvider(); | 250 return layer_tree_host_impl_->resourceProvider(); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 259 } | 263 } |
| 260 | 264 |
| 261 bool LayerTreeImpl::IsActiveTree() const { | 265 bool LayerTreeImpl::IsActiveTree() const { |
| 262 return layer_tree_host_impl_->activeTree() == this; | 266 return layer_tree_host_impl_->activeTree() == this; |
| 263 } | 267 } |
| 264 | 268 |
| 265 bool LayerTreeImpl::IsPendingTree() const { | 269 bool LayerTreeImpl::IsPendingTree() const { |
| 266 return layer_tree_host_impl_->pendingTree() == this; | 270 return layer_tree_host_impl_->pendingTree() == this; |
| 267 } | 271 } |
| 268 | 272 |
| 273 bool LayerTreeImpl::IsRecycleTree() const { |
| 274 return layer_tree_host_impl_->recycleTree() == this; |
| 275 } |
| 276 |
| 269 LayerImpl* LayerTreeImpl::FindActiveTreeLayerById(int id) { | 277 LayerImpl* LayerTreeImpl::FindActiveTreeLayerById(int id) { |
| 270 LayerTreeImpl* tree = layer_tree_host_impl_->activeTree(); | 278 LayerTreeImpl* tree = layer_tree_host_impl_->activeTree(); |
| 271 if (!tree) | 279 if (!tree) |
| 272 return NULL; | 280 return NULL; |
| 273 return tree->LayerById(id); | 281 return tree->LayerById(id); |
| 274 } | 282 } |
| 275 | 283 |
| 276 LayerImpl* LayerTreeImpl::FindPendingTreeLayerById(int id) { | 284 LayerImpl* LayerTreeImpl::FindPendingTreeLayerById(int id) { |
| 277 LayerTreeImpl* tree = layer_tree_host_impl_->pendingTree(); | 285 LayerTreeImpl* tree = layer_tree_host_impl_->pendingTree(); |
| 278 if (!tree) | 286 if (!tree) |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 | 330 |
| 323 AnimationRegistrar* LayerTreeImpl::animationRegistrar() const { | 331 AnimationRegistrar* LayerTreeImpl::animationRegistrar() const { |
| 324 return layer_tree_host_impl_->animationRegistrar(); | 332 return layer_tree_host_impl_->animationRegistrar(); |
| 325 } | 333 } |
| 326 | 334 |
| 327 const PinchZoomViewport& LayerTreeImpl::pinch_zoom_viewport() const { | 335 const PinchZoomViewport& LayerTreeImpl::pinch_zoom_viewport() const { |
| 328 return layer_tree_host_impl_->pinchZoomViewport(); | 336 return layer_tree_host_impl_->pinchZoomViewport(); |
| 329 } | 337 } |
| 330 | 338 |
| 331 } // namespace cc | 339 } // namespace cc |
| OLD | NEW |