| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/layers/layer_position_constraint.h" | 5 #include "cc/layers/layer_position_constraint.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "cc/layers/layer_impl.h" | 9 #include "cc/layers/layer_impl.h" |
| 10 #include "cc/test/fake_impl_proxy.h" | 10 #include "cc/test/fake_impl_proxy.h" |
| 11 #include "cc/test/fake_layer_tree_host_impl.h" | 11 #include "cc/test/fake_layer_tree_host_impl.h" |
| 12 #include "cc/test/geometry_test_utils.h" | 12 #include "cc/test/geometry_test_utils.h" |
| 13 #include "cc/trees/layer_tree_host_common.h" | 13 #include "cc/trees/layer_tree_host_common.h" |
| 14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
| 15 | 15 |
| 16 namespace cc { | 16 namespace cc { |
| 17 namespace { | 17 namespace { |
| 18 | 18 |
| 19 void SetLayerPropertiesForTesting(LayerImpl* layer, | 19 void SetLayerPropertiesForTesting(LayerImpl* layer, |
| 20 const gfx::Transform& transform, | 20 const gfx::Transform& transform, |
| 21 const gfx::Transform& sublayer_transform, | 21 const gfx::Transform& sublayer_transform, |
| 22 gfx::PointF anchor, | 22 const gfx::PointF& anchor, |
| 23 gfx::PointF position, | 23 const gfx::PointF& position, |
| 24 gfx::Size bounds, | 24 gfx::Size bounds, |
| 25 bool preserves3d) { | 25 bool preserves3d) { |
| 26 layer->SetTransform(transform); | 26 layer->SetTransform(transform); |
| 27 layer->SetSublayerTransform(sublayer_transform); | 27 layer->SetSublayerTransform(sublayer_transform); |
| 28 layer->SetAnchorPoint(anchor); | 28 layer->SetAnchorPoint(anchor); |
| 29 layer->SetPosition(position); | 29 layer->SetPosition(position); |
| 30 layer->SetBounds(bounds); | 30 layer->SetBounds(bounds); |
| 31 layer->SetPreserves3d(preserves3d); | 31 layer->SetPreserves3d(preserves3d); |
| 32 layer->SetContentBounds(bounds); | 32 layer->SetContentBounds(bounds); |
| 33 } | 33 } |
| (...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1204 | 1204 |
| 1205 EXPECT_TRANSFORMATION_MATRIX_EQ(expected_container2_transform, | 1205 EXPECT_TRANSFORMATION_MATRIX_EQ(expected_container2_transform, |
| 1206 container2->draw_transform()); | 1206 container2->draw_transform()); |
| 1207 | 1207 |
| 1208 EXPECT_TRANSFORMATION_MATRIX_EQ(expected_fixed_to_container2_transform, | 1208 EXPECT_TRANSFORMATION_MATRIX_EQ(expected_fixed_to_container2_transform, |
| 1209 fixed_to_container2->draw_transform()); | 1209 fixed_to_container2->draw_transform()); |
| 1210 } | 1210 } |
| 1211 | 1211 |
| 1212 } // namespace | 1212 } // namespace |
| 1213 } // namespace cc | 1213 } // namespace cc |
| OLD | NEW |