| 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 TEST(PropertyTreeSerializationTest, EffectNodeDataSerialization) { | 179 TEST(PropertyTreeSerializationTest, EffectNodeDataSerialization) { |
| 180 EffectNodeData original; | 180 EffectNodeData original; |
| 181 original.opacity = 0.5f; | 181 original.opacity = 0.5f; |
| 182 original.screen_space_opacity = 0.6f; | 182 original.screen_space_opacity = 0.6f; |
| 183 original.has_render_surface = false; | 183 original.has_render_surface = false; |
| 184 original.transform_id = 2; | 184 original.transform_id = 2; |
| 185 original.clip_id = 3; | 185 original.clip_id = 3; |
| 186 original.mask_layer_id = 6; | 186 original.mask_layer_id = 6; |
| 187 original.replica_layer_id = 10; | 187 original.replica_layer_id = 10; |
| 188 original.replica_mask_layer_id = 9; | 188 original.replica_mask_layer_id = 9; |
| 189 original.sublayer_scale = gfx::Vector2dF(0.5f, 0.5f); |
| 189 | 190 |
| 190 proto::TreeNode proto; | 191 proto::TreeNode proto; |
| 191 original.ToProtobuf(&proto); | 192 original.ToProtobuf(&proto); |
| 192 EffectNodeData result; | 193 EffectNodeData result; |
| 193 result.FromProtobuf(proto); | 194 result.FromProtobuf(proto); |
| 194 | 195 |
| 195 EXPECT_EQ(original, result); | 196 EXPECT_EQ(original, result); |
| 196 } | 197 } |
| 197 | 198 |
| 198 TEST(PropertyTreeSerializationTest, EffectNodeSerialization) { | 199 TEST(PropertyTreeSerializationTest, EffectNodeSerialization) { |
| (...skipping 952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1151 | 1152 |
| 1152 DIRECT_AND_SERIALIZED_PROPERTY_TREE_TEST_F( | 1153 DIRECT_AND_SERIALIZED_PROPERTY_TREE_TEST_F( |
| 1153 PropertyTreeTestSingularTransformSnapTest); | 1154 PropertyTreeTestSingularTransformSnapTest); |
| 1154 | 1155 |
| 1155 #undef DIRECT_AND_SERIALIZED_PROPERTY_TREE_TEST_F | 1156 #undef DIRECT_AND_SERIALIZED_PROPERTY_TREE_TEST_F |
| 1156 #undef SERIALIZED_PROPERTY_TREE_TEST_F | 1157 #undef SERIALIZED_PROPERTY_TREE_TEST_F |
| 1157 #undef DIRECT_PROPERTY_TREE_TEST_F | 1158 #undef DIRECT_PROPERTY_TREE_TEST_F |
| 1158 | 1159 |
| 1159 } // namespace | 1160 } // namespace |
| 1160 } // namespace cc | 1161 } // namespace cc |
| OLD | NEW |