| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->SetContentsOpaque(true)); | 124 EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->SetContentsOpaque(true)); |
| 125 EXECUTE_AND_VERIFY_SUBTREE_CHANGED( | 125 EXECUTE_AND_VERIFY_SUBTREE_CHANGED( |
| 126 root->SetReplicaLayer(LayerImpl::Create(host_impl.active_tree(), 5))); | 126 root->SetReplicaLayer(LayerImpl::Create(host_impl.active_tree(), 5))); |
| 127 EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->SetPosition(arbitrary_point_f)); | 127 EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->SetPosition(arbitrary_point_f)); |
| 128 EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->SetPreserves3d(true)); | 128 EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->SetPreserves3d(true)); |
| 129 EXECUTE_AND_VERIFY_SUBTREE_CHANGED( | 129 EXECUTE_AND_VERIFY_SUBTREE_CHANGED( |
| 130 root->SetDoubleSided(false)); // constructor initializes it to "true". | 130 root->SetDoubleSided(false)); // constructor initializes it to "true". |
| 131 EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->ScrollBy(arbitrary_vector2d)); | 131 EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->ScrollBy(arbitrary_vector2d)); |
| 132 EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->SetScrollDelta(gfx::Vector2d())); | 132 EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->SetScrollDelta(gfx::Vector2d())); |
| 133 EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->SetScrollOffset(arbitrary_vector2d)); | 133 EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->SetScrollOffset(arbitrary_vector2d)); |
| 134 EXECUTE_AND_VERIFY_SUBTREE_CHANGED(root->SetHideLayerAndSubtree(true)); |
| 134 | 135 |
| 135 // Changing these properties only affects the layer itself. | 136 // Changing these properties only affects the layer itself. |
| 136 EXECUTE_AND_VERIFY_ONLY_LAYER_CHANGED(root->SetContentBounds(arbitrary_size)); | 137 EXECUTE_AND_VERIFY_ONLY_LAYER_CHANGED(root->SetContentBounds(arbitrary_size)); |
| 137 EXECUTE_AND_VERIFY_ONLY_LAYER_CHANGED( | 138 EXECUTE_AND_VERIFY_ONLY_LAYER_CHANGED( |
| 138 root->SetContentsScale(arbitrary_number, arbitrary_number)); | 139 root->SetContentsScale(arbitrary_number, arbitrary_number)); |
| 139 EXECUTE_AND_VERIFY_ONLY_LAYER_CHANGED(root->SetDrawsContent(true)); | 140 EXECUTE_AND_VERIFY_ONLY_LAYER_CHANGED(root->SetDrawsContent(true)); |
| 140 EXECUTE_AND_VERIFY_ONLY_LAYER_CHANGED( | 141 EXECUTE_AND_VERIFY_ONLY_LAYER_CHANGED( |
| 141 root->SetBackgroundColor(arbitrary_color)); | 142 root->SetBackgroundColor(arbitrary_color)); |
| 142 EXECUTE_AND_VERIFY_ONLY_LAYER_CHANGED( | 143 EXECUTE_AND_VERIFY_ONLY_LAYER_CHANGED( |
| 143 root->SetBackgroundFilters(arbitrary_filters)); | 144 root->SetBackgroundFilters(arbitrary_filters)); |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 << "Flags: " << contents_opaque << ", " << layer_opaque << ", " | 319 << "Flags: " << contents_opaque << ", " << layer_opaque << ", " |
| 319 << host_opaque << "\n"; | 320 << host_opaque << "\n"; |
| 320 } | 321 } |
| 321 } | 322 } |
| 322 } | 323 } |
| 323 } | 324 } |
| 324 } | 325 } |
| 325 | 326 |
| 326 } // namespace | 327 } // namespace |
| 327 } // namespace cc | 328 } // namespace cc |
| OLD | NEW |