| 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 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 663 replica_layer_transform.Scale3d(3.0, 3.0, 1.0); | 663 replica_layer_transform.Scale3d(3.0, 3.0, 1.0); |
| 664 gfx::Vector2dF parent_composite_scale = | 664 gfx::Vector2dF parent_composite_scale = |
| 665 MathUtil::ComputeTransform2dScaleComponents(parent_composite_transform, | 665 MathUtil::ComputeTransform2dScaleComponents(parent_composite_transform, |
| 666 1.f); | 666 1.f); |
| 667 gfx::Transform surface_sublayer_transform; | 667 gfx::Transform surface_sublayer_transform; |
| 668 surface_sublayer_transform.Scale(parent_composite_scale.x(), | 668 surface_sublayer_transform.Scale(parent_composite_scale.x(), |
| 669 parent_composite_scale.y()); | 669 parent_composite_scale.y()); |
| 670 gfx::Transform replica_composite_transform = | 670 gfx::Transform replica_composite_transform = |
| 671 parent_composite_transform * replica_layer_transform * | 671 parent_composite_transform * replica_layer_transform * |
| 672 Inverse(surface_sublayer_transform); | 672 Inverse(surface_sublayer_transform); |
| 673 | 673 child_replica->SetIsDrawable(true); |
| 674 // Child's render surface should not exist yet. | 674 // Child's render surface should not exist yet. |
| 675 ASSERT_FALSE(child->render_surface()); | 675 ASSERT_FALSE(child->render_surface()); |
| 676 | 676 |
| 677 SetLayerPropertiesForTesting(parent.get(), | 677 SetLayerPropertiesForTesting(parent.get(), |
| 678 parent_layer_transform, | 678 parent_layer_transform, |
| 679 gfx::Point3F(2.5f, 3.0f, 0.f), | 679 gfx::Point3F(2.5f, 3.0f, 0.f), |
| 680 gfx::PointF(), | 680 gfx::PointF(), |
| 681 gfx::Size(10, 12), | 681 gfx::Size(10, 12), |
| 682 true, | 682 true, |
| 683 false); | 683 false); |
| (...skipping 8035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8719 | 8719 |
| 8720 LayerTreeHostCommon::CalculateDrawProperties(&inputs); | 8720 LayerTreeHostCommon::CalculateDrawProperties(&inputs); |
| 8721 | 8721 |
| 8722 gfx::Rect affected_by_delta(0, 0, root_size.width(), | 8722 gfx::Rect affected_by_delta(0, 0, root_size.width(), |
| 8723 root_size.height() + 50); | 8723 root_size.height() + 50); |
| 8724 EXPECT_EQ(affected_by_delta, sublayer->visible_content_rect()); | 8724 EXPECT_EQ(affected_by_delta, sublayer->visible_content_rect()); |
| 8725 } | 8725 } |
| 8726 | 8726 |
| 8727 } // namespace | 8727 } // namespace |
| 8728 } // namespace cc | 8728 } // namespace cc |
| OLD | NEW |