| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 | 368 |
| 369 if (hud_layer()) | 369 if (hud_layer()) |
| 370 target_tree->set_hud_layer(static_cast<HeadsUpDisplayLayerImpl*>( | 370 target_tree->set_hud_layer(static_cast<HeadsUpDisplayLayerImpl*>( |
| 371 LayerTreeHostCommon::FindLayerInSubtree( | 371 LayerTreeHostCommon::FindLayerInSubtree( |
| 372 target_tree->root_layer(), hud_layer()->id()))); | 372 target_tree->root_layer(), hud_layer()->id()))); |
| 373 else | 373 else |
| 374 target_tree->set_hud_layer(NULL); | 374 target_tree->set_hud_layer(NULL); |
| 375 | 375 |
| 376 target_tree->has_ever_been_drawn_ = false; | 376 target_tree->has_ever_been_drawn_ = false; |
| 377 } | 377 } |
| 378 |
| 379 LayerListIterator LayerTreeImpl::begin() { |
| 380 return LayerListIterator(root_layer_.get()); |
| 381 } |
| 382 |
| 383 LayerListIterator LayerTreeImpl::end() { |
| 384 return LayerListIterator(nullptr); |
| 385 } |
| 386 |
| 387 LayerListReverseIterator LayerTreeImpl::rbegin() { |
| 388 return LayerListReverseIterator(root_layer_.get()); |
| 389 } |
| 390 |
| 391 LayerListReverseIterator LayerTreeImpl::rend() { |
| 392 return LayerListReverseIterator(nullptr); |
| 393 } |
| 394 |
| 378 void LayerTreeImpl::AddToElementMap(LayerImpl* layer) { | 395 void LayerTreeImpl::AddToElementMap(LayerImpl* layer) { |
| 379 if (!layer->element_id() || !layer->mutable_properties()) | 396 if (!layer->element_id() || !layer->mutable_properties()) |
| 380 return; | 397 return; |
| 381 | 398 |
| 382 TRACE_EVENT2(TRACE_DISABLED_BY_DEFAULT("compositor-worker"), | 399 TRACE_EVENT2(TRACE_DISABLED_BY_DEFAULT("compositor-worker"), |
| 383 "LayerTreeImpl::AddToElementMap", "element_id", | 400 "LayerTreeImpl::AddToElementMap", "element_id", |
| 384 layer->element_id(), "layer_id", layer->id()); | 401 layer->element_id(), "layer_id", layer->id()); |
| 385 | 402 |
| 386 ElementLayers& layers = element_layers_map_[layer->element_id()]; | 403 ElementLayers& layers = element_layers_map_[layer->element_id()]; |
| 387 if ((!layers.main || layer->IsActive()) && !layer->scrollable()) { | 404 if ((!layers.main || layer->IsActive()) && !layer->scrollable()) { |
| (...skipping 1648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2036 const gfx::BoxF& box, | 2053 const gfx::BoxF& box, |
| 2037 gfx::BoxF* bounds) const { | 2054 gfx::BoxF* bounds) const { |
| 2038 *bounds = gfx::BoxF(); | 2055 *bounds = gfx::BoxF(); |
| 2039 return layer_tree_host_impl_->animation_host() | 2056 return layer_tree_host_impl_->animation_host() |
| 2040 ? layer_tree_host_impl_->animation_host() | 2057 ? layer_tree_host_impl_->animation_host() |
| 2041 ->TransformAnimationBoundsForBox(layer->id(), box, bounds) | 2058 ->TransformAnimationBoundsForBox(layer->id(), box, bounds) |
| 2042 : true; | 2059 : true; |
| 2043 } | 2060 } |
| 2044 | 2061 |
| 2045 } // namespace cc | 2062 } // namespace cc |
| OLD | NEW |