Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Side by Side Diff: cc/layers/layer_impl_unittest.cc

Issue 16896017: Add a hide_layer_and_subtree() flag to cc::Layer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: hide-subtree-flag: SetIsDrawable on the new cc_layer Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | cc/layers/layer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | cc/layers/layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698