| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/property_tree.h" | 5 #include "cc/trees/property_tree.h" |
| 6 | 6 |
| 7 #include "cc/input/main_thread_scrolling_reason.h" | 7 #include "cc/input/main_thread_scrolling_reason.h" |
| 8 #include "cc/proto/property_tree.pb.h" | 8 #include "cc/proto/property_tree.pb.h" |
| 9 #include "cc/test/geometry_test_utils.h" | 9 #include "cc/test/geometry_test_utils.h" |
| 10 #include "cc/trees/draw_property_utils.h" | 10 #include "cc/trees/draw_property_utils.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 original.from_target.Translate3d(4.3f, 2.f, 3.f); | 23 original.from_target.Translate3d(4.3f, 2.f, 3.f); |
| 24 original.to_screen.Translate3d(7.2f, 2.f, 4.5f); | 24 original.to_screen.Translate3d(7.2f, 2.f, 4.5f); |
| 25 original.from_screen.Translate3d(2.f, 2.f, 7.f); | 25 original.from_screen.Translate3d(2.f, 2.f, 7.f); |
| 26 original.target_id = 3; | 26 original.target_id = 3; |
| 27 original.content_target_id = 4; | 27 original.content_target_id = 4; |
| 28 original.source_node_id = 5; | 28 original.source_node_id = 5; |
| 29 original.needs_local_transform_update = false; | 29 original.needs_local_transform_update = false; |
| 30 original.is_invertible = false; | 30 original.is_invertible = false; |
| 31 original.ancestors_are_invertible = false; | 31 original.ancestors_are_invertible = false; |
| 32 original.is_animated = false; | 32 original.is_animated = false; |
| 33 original.to_screen_is_animated = false; | 33 original.to_screen_is_potentially_animated = false; |
| 34 original.has_only_translation_animations = false; | 34 original.has_only_translation_animations = false; |
| 35 original.to_screen_has_scale_animation = false; | 35 original.to_screen_has_scale_animation = false; |
| 36 original.flattens_inherited_transform = false; | 36 original.flattens_inherited_transform = false; |
| 37 original.node_and_ancestors_are_flat = false; | 37 original.node_and_ancestors_are_flat = false; |
| 38 original.node_and_ancestors_have_only_integer_translation = false; | 38 original.node_and_ancestors_have_only_integer_translation = false; |
| 39 original.scrolls = false; | 39 original.scrolls = false; |
| 40 original.needs_sublayer_scale = false; | 40 original.needs_sublayer_scale = false; |
| 41 original.affected_by_inner_viewport_bounds_delta_x = false; | 41 original.affected_by_inner_viewport_bounds_delta_x = false; |
| 42 original.affected_by_inner_viewport_bounds_delta_y = false; | 42 original.affected_by_inner_viewport_bounds_delta_y = false; |
| 43 original.affected_by_outer_viewport_bounds_delta_x = false; | 43 original.affected_by_outer_viewport_bounds_delta_x = false; |
| (...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1067 tree = TransformTreeForTest(tree); | 1067 tree = TransformTreeForTest(tree); |
| 1068 draw_property_utils::ComputeTransforms(&tree); | 1068 draw_property_utils::ComputeTransforms(&tree); |
| 1069 | 1069 |
| 1070 gfx::Transform from_target; | 1070 gfx::Transform from_target; |
| 1071 EXPECT_FALSE(child_node->data.to_target.GetInverse(&from_target)); | 1071 EXPECT_FALSE(child_node->data.to_target.GetInverse(&from_target)); |
| 1072 // The following checks are to ensure that snapping is skipped because of | 1072 // The following checks are to ensure that snapping is skipped because of |
| 1073 // singular transform (and not because of other reasons which also cause | 1073 // singular transform (and not because of other reasons which also cause |
| 1074 // snapping to be skipped). | 1074 // snapping to be skipped). |
| 1075 EXPECT_TRUE(child_node->data.scrolls); | 1075 EXPECT_TRUE(child_node->data.scrolls); |
| 1076 EXPECT_TRUE(child_node->data.to_target.IsScaleOrTranslation()); | 1076 EXPECT_TRUE(child_node->data.to_target.IsScaleOrTranslation()); |
| 1077 EXPECT_FALSE(child_node->data.to_screen_is_animated); | 1077 EXPECT_FALSE(child_node->data.to_screen_is_potentially_animated); |
| 1078 EXPECT_FALSE(child_node->data.ancestors_are_invertible); | 1078 EXPECT_FALSE(child_node->data.ancestors_are_invertible); |
| 1079 | 1079 |
| 1080 gfx::Transform rounded = child_node->data.to_target; | 1080 gfx::Transform rounded = child_node->data.to_target; |
| 1081 rounded.RoundTranslationComponents(); | 1081 rounded.RoundTranslationComponents(); |
| 1082 EXPECT_NE(child_node->data.to_target, rounded); | 1082 EXPECT_NE(child_node->data.to_target, rounded); |
| 1083 } | 1083 } |
| 1084 }; | 1084 }; |
| 1085 | 1085 |
| 1086 DIRECT_AND_SERIALIZED_PROPERTY_TREE_TEST_F( | 1086 DIRECT_AND_SERIALIZED_PROPERTY_TREE_TEST_F( |
| 1087 PropertyTreeTestSingularTransformSnapTest); | 1087 PropertyTreeTestSingularTransformSnapTest); |
| 1088 | 1088 |
| 1089 #undef DIRECT_AND_SERIALIZED_PROPERTY_TREE_TEST_F | 1089 #undef DIRECT_AND_SERIALIZED_PROPERTY_TREE_TEST_F |
| 1090 #undef SERIALIZED_PROPERTY_TREE_TEST_F | 1090 #undef SERIALIZED_PROPERTY_TREE_TEST_F |
| 1091 #undef DIRECT_PROPERTY_TREE_TEST_F | 1091 #undef DIRECT_PROPERTY_TREE_TEST_F |
| 1092 | 1092 |
| 1093 } // namespace | 1093 } // namespace |
| 1094 } // namespace cc | 1094 } // namespace cc |
| OLD | NEW |