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 <set> | 7 #include <set> |
8 | 8 |
9 #include "cc/animation/layer_animation_controller.h" | 9 #include "cc/animation/layer_animation_controller.h" |
10 #include "cc/animation/transform_operations.h" | 10 #include "cc/animation/transform_operations.h" |
(...skipping 7834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7845 AnimationScaleFactorTrackingLayerImpl::Create(host_impl.active_tree(), 2); | 7845 AnimationScaleFactorTrackingLayerImpl::Create(host_impl.active_tree(), 2); |
7846 scoped_ptr<AnimationScaleFactorTrackingLayerImpl> child = | 7846 scoped_ptr<AnimationScaleFactorTrackingLayerImpl> child = |
7847 AnimationScaleFactorTrackingLayerImpl::Create(host_impl.active_tree(), 3); | 7847 AnimationScaleFactorTrackingLayerImpl::Create(host_impl.active_tree(), 3); |
7848 scoped_ptr<AnimationScaleFactorTrackingLayerImpl> grand_child = | 7848 scoped_ptr<AnimationScaleFactorTrackingLayerImpl> grand_child = |
7849 AnimationScaleFactorTrackingLayerImpl::Create(host_impl.active_tree(), 4); | 7849 AnimationScaleFactorTrackingLayerImpl::Create(host_impl.active_tree(), 4); |
7850 | 7850 |
7851 AnimationScaleFactorTrackingLayerImpl* parent_raw = parent.get(); | 7851 AnimationScaleFactorTrackingLayerImpl* parent_raw = parent.get(); |
7852 AnimationScaleFactorTrackingLayerImpl* child_raw = child.get(); | 7852 AnimationScaleFactorTrackingLayerImpl* child_raw = child.get(); |
7853 AnimationScaleFactorTrackingLayerImpl* grand_child_raw = grand_child.get(); | 7853 AnimationScaleFactorTrackingLayerImpl* grand_child_raw = grand_child.get(); |
7854 | 7854 |
7855 child->AddChild(grand_child.PassAs<LayerImpl>()); | 7855 child->AddChild(grand_child.Pass()); |
7856 parent->AddChild(child.PassAs<LayerImpl>()); | 7856 parent->AddChild(child.Pass()); |
7857 grand_parent->AddChild(parent.PassAs<LayerImpl>()); | 7857 grand_parent->AddChild(parent.Pass()); |
7858 | 7858 |
7859 SetLayerPropertiesForTesting(grand_parent.get(), | 7859 SetLayerPropertiesForTesting(grand_parent.get(), |
7860 identity_matrix, | 7860 identity_matrix, |
7861 gfx::Point3F(), | 7861 gfx::Point3F(), |
7862 gfx::PointF(), | 7862 gfx::PointF(), |
7863 gfx::Size(1, 2), | 7863 gfx::Size(1, 2), |
7864 true, | 7864 true, |
7865 false); | 7865 false); |
7866 SetLayerPropertiesForTesting(parent_raw, | 7866 SetLayerPropertiesForTesting(parent_raw, |
7867 identity_matrix, | 7867 identity_matrix, |
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8610 // by the viewport. | 8610 // by the viewport. |
8611 EXPECT_EQ(gfx::Rect(768 / 2, 582 / 2), root->visible_content_rect()); | 8611 EXPECT_EQ(gfx::Rect(768 / 2, 582 / 2), root->visible_content_rect()); |
8612 | 8612 |
8613 // Layers drawing to a child render surface should still have their visible | 8613 // Layers drawing to a child render surface should still have their visible |
8614 // content rect clipped by the viewport. | 8614 // content rect clipped by the viewport. |
8615 EXPECT_EQ(gfx::Rect(768 / 2, 582 / 2), content->visible_content_rect()); | 8615 EXPECT_EQ(gfx::Rect(768 / 2, 582 / 2), content->visible_content_rect()); |
8616 } | 8616 } |
8617 | 8617 |
8618 } // namespace | 8618 } // namespace |
8619 } // namespace cc | 8619 } // namespace cc |
OLD | NEW |