| 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/layers/layer_impl.h" | 5 #include "cc/layers/layer_impl.h" |
| 6 | 6 |
| 7 #include "cc/test/fake_impl_proxy.h" | 7 #include "cc/test/fake_impl_proxy.h" |
| 8 #include "cc/test/fake_layer_tree_host_impl.h" | 8 #include "cc/test/fake_layer_tree_host_impl.h" |
| 9 #include "cc/test/fake_output_surface.h" | 9 #include "cc/test/fake_output_surface.h" |
| 10 #include "cc/trees/layer_tree_impl.h" | 10 #include "cc/trees/layer_tree_impl.h" |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 root->SetTransform(arbitrary_transform)); | 148 root->SetTransform(arbitrary_transform)); |
| 149 | 149 |
| 150 // Special case: check that sublayer transform changes all layer's | 150 // Special case: check that sublayer transform changes all layer's |
| 151 // descendants, but not the layer itself. | 151 // descendants, but not the layer itself. |
| 152 root->ResetAllChangeTrackingForSubtree(); | 152 root->ResetAllChangeTrackingForSubtree(); |
| 153 root->SetSublayerTransform(arbitrary_transform); | 153 root->SetSublayerTransform(arbitrary_transform); |
| 154 EXPECT_FALSE(root->LayerPropertyChanged()); | 154 EXPECT_FALSE(root->LayerPropertyChanged()); |
| 155 EXPECT_TRUE(child->LayerPropertyChanged()); | 155 EXPECT_TRUE(child->LayerPropertyChanged()); |
| 156 EXPECT_TRUE(grand_child->LayerPropertyChanged()); | 156 EXPECT_TRUE(grand_child->LayerPropertyChanged()); |
| 157 | 157 |
| 158 // Special case: check that setBounds changes behavior depending on | 158 // Special case: check that SetBounds changes behavior depending on |
| 159 // masksToBounds. | 159 // masksToBounds. |
| 160 root->SetMasksToBounds(false); | 160 root->SetMasksToBounds(false); |
| 161 EXECUTE_AND_VERIFY_ONLY_LAYER_CHANGED(root->SetBounds(gfx::Size(135, 246))); | 161 EXECUTE_AND_VERIFY_ONLY_LAYER_CHANGED(root->SetBounds(gfx::Size(135, 246))); |
| 162 root->SetMasksToBounds(true); | 162 root->SetMasksToBounds(true); |
| 163 // Should be a different size than previous call, to ensure it marks tree | 163 // Should be a different size than previous call, to ensure it marks tree |
| 164 // changed. | 164 // changed. |
| 165 EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->SetBounds(arbitrary_size)); | 165 EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->SetBounds(arbitrary_size)); |
| 166 | 166 |
| 167 // After setting all these properties already, setting to the exact same | 167 // After setting all these properties already, setting to the exact same |
| 168 // values again should not cause any change. | 168 // values again should not cause any change. |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(root->SetOpacity(arbitrary_number)); | 293 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(root->SetOpacity(arbitrary_number)); |
| 294 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES( | 294 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES( |
| 295 root->SetTransform(arbitrary_transform)); | 295 root->SetTransform(arbitrary_transform)); |
| 296 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES( | 296 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES( |
| 297 root->SetSublayerTransform(arbitrary_transform)); | 297 root->SetSublayerTransform(arbitrary_transform)); |
| 298 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(root->SetBounds(arbitrary_size)); | 298 VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(root->SetBounds(arbitrary_size)); |
| 299 } | 299 } |
| 300 | 300 |
| 301 } // namespace | 301 } // namespace |
| 302 } // namespace cc | 302 } // namespace cc |
| OLD | NEW |