| 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_common.h" | 5 #include "cc/trees/layer_tree_host_common.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "cc/animation/layer_animation_controller.h" | 10 #include "cc/animation/layer_animation_controller.h" |
| (...skipping 7944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7955 | 7955 |
| 7956 LayerImpl* root = host_impl.active_tree()->root_layer(); | 7956 LayerImpl* root = host_impl.active_tree()->root_layer(); |
| 7957 SetLayerPropertiesForTesting(root, | 7957 SetLayerPropertiesForTesting(root, |
| 7958 identity_matrix, | 7958 identity_matrix, |
| 7959 gfx::Point3F(), | 7959 gfx::Point3F(), |
| 7960 gfx::PointF(), | 7960 gfx::PointF(), |
| 7961 root_size, | 7961 root_size, |
| 7962 false, | 7962 false, |
| 7963 false, | 7963 false, |
| 7964 true); | 7964 true); |
| 7965 | |
| 7966 root->SetContentBounds(root_size); | |
| 7967 root->SetMasksToBounds(true); | 7965 root->SetMasksToBounds(true); |
| 7968 | 7966 |
| 7969 root->AddChild(LayerImpl::Create(host_impl.active_tree(), 2)); | 7967 root->AddChild(LayerImpl::Create(host_impl.active_tree(), 2)); |
| 7970 | 7968 |
| 7971 LayerImpl* sublayer = root->child_at(0); | 7969 LayerImpl* sublayer = root->child_at(0); |
| 7972 SetLayerPropertiesForTesting(sublayer, | 7970 SetLayerPropertiesForTesting(sublayer, |
| 7973 identity_matrix, | 7971 identity_matrix, |
| 7974 gfx::Point3F(), | 7972 gfx::Point3F(), |
| 7975 gfx::PointF(), | 7973 gfx::PointF(), |
| 7976 sublayer_size, | 7974 sublayer_size, |
| 7977 false, | 7975 false, |
| 7978 false, | 7976 false, |
| 7979 false); | 7977 false); |
| 7980 | |
| 7981 sublayer->SetContentBounds(sublayer_size); | |
| 7982 sublayer->SetDrawsContent(true); | 7978 sublayer->SetDrawsContent(true); |
| 7983 | 7979 |
| 7984 LayerImplList layer_impl_list; | 7980 LayerImplList layer_impl_list; |
| 7985 LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting inputs( | 7981 LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting inputs( |
| 7986 root, device_viewport_size, &layer_impl_list); | 7982 root, device_viewport_size, &layer_impl_list); |
| 7987 | 7983 |
| 7988 LayerTreeHostCommon::CalculateDrawProperties(&inputs); | 7984 LayerTreeHostCommon::CalculateDrawProperties(&inputs); |
| 7989 | 7985 |
| 7990 EXPECT_EQ(gfx::Rect(root_size), sublayer->visible_content_rect()); | 7986 EXPECT_EQ(gfx::Rect(root_size), sublayer->visible_content_rect()); |
| 7991 | 7987 |
| (...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8810 EXPECT_FALSE(root->layer_or_descendant_is_drawn()); | 8806 EXPECT_FALSE(root->layer_or_descendant_is_drawn()); |
| 8811 EXPECT_FALSE(root->visited()); | 8807 EXPECT_FALSE(root->visited()); |
| 8812 EXPECT_FALSE(root->sorted_for_recursion()); | 8808 EXPECT_FALSE(root->sorted_for_recursion()); |
| 8813 EXPECT_FALSE(child->layer_or_descendant_is_drawn()); | 8809 EXPECT_FALSE(child->layer_or_descendant_is_drawn()); |
| 8814 EXPECT_FALSE(child->visited()); | 8810 EXPECT_FALSE(child->visited()); |
| 8815 EXPECT_FALSE(child->sorted_for_recursion()); | 8811 EXPECT_FALSE(child->sorted_for_recursion()); |
| 8816 } | 8812 } |
| 8817 | 8813 |
| 8818 } // namespace | 8814 } // namespace |
| 8819 } // namespace cc | 8815 } // namespace cc |
| OLD | NEW |