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 <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
744 TRACE_EVENT_END1("cc", "LayerTreeImpl::UpdateTilePriorities", | 744 TRACE_EVENT_END1("cc", "LayerTreeImpl::UpdateTilePriorities", |
745 "layers_updated_count", layers_updated_count); | 745 "layers_updated_count", layers_updated_count); |
746 } | 746 } |
747 | 747 |
748 DCHECK(!needs_update_draw_properties_) << | 748 DCHECK(!needs_update_draw_properties_) << |
749 "CalcDrawProperties should not set_needs_update_draw_properties()"; | 749 "CalcDrawProperties should not set_needs_update_draw_properties()"; |
750 return true; | 750 return true; |
751 } | 751 } |
752 | 752 |
753 void LayerTreeImpl::BuildPropertyTreesForTesting() { | 753 void LayerTreeImpl::BuildPropertyTreesForTesting() { |
754 LayerTreeHostCommon::PreCalculateMetaInformationForTesting(root_layer_.get()); | |
755 PropertyTreeBuilder::BuildPropertyTrees( | 754 PropertyTreeBuilder::BuildPropertyTrees( |
756 root_layer_.get(), page_scale_layer_, inner_viewport_scroll_layer_, | 755 root_layer_.get(), page_scale_layer_, inner_viewport_scroll_layer_, |
757 outer_viewport_scroll_layer_, current_page_scale_factor(), | 756 outer_viewport_scroll_layer_, current_page_scale_factor(), |
758 device_scale_factor(), gfx::Rect(DrawViewportSize()), | 757 device_scale_factor(), gfx::Rect(DrawViewportSize()), |
759 layer_tree_host_impl_->DrawTransform(), &property_trees_); | 758 layer_tree_host_impl_->DrawTransform(), &property_trees_); |
760 } | 759 } |
761 | 760 |
762 const LayerImplList& LayerTreeImpl::RenderSurfaceLayerList() const { | 761 const LayerImplList& LayerTreeImpl::RenderSurfaceLayerList() const { |
763 // If this assert triggers, then the list is dirty. | 762 // If this assert triggers, then the list is dirty. |
764 DCHECK(!needs_update_draw_properties_); | 763 DCHECK(!needs_update_draw_properties_); |
(...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1748 const gfx::BoxF& box, | 1747 const gfx::BoxF& box, |
1749 gfx::BoxF* bounds) const { | 1748 gfx::BoxF* bounds) const { |
1750 *bounds = gfx::BoxF(); | 1749 *bounds = gfx::BoxF(); |
1751 return layer_tree_host_impl_->animation_host() | 1750 return layer_tree_host_impl_->animation_host() |
1752 ? layer_tree_host_impl_->animation_host() | 1751 ? layer_tree_host_impl_->animation_host() |
1753 ->TransformAnimationBoundsForBox(layer->id(), box, bounds) | 1752 ->TransformAnimationBoundsForBox(layer->id(), box, bounds) |
1754 : true; | 1753 : true; |
1755 } | 1754 } |
1756 | 1755 |
1757 } // namespace cc | 1756 } // namespace cc |
OLD | NEW |