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

Side by Side Diff: cc/layers/layer_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, 5 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_unittest.cc ('k') | cc/trees/layer_tree_host_common.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.h" 5 #include "cc/layers/layer.h"
6 6
7 #include "cc/animation/keyframed_animation_curve.h" 7 #include "cc/animation/keyframed_animation_curve.h"
8 #include "cc/base/math_util.h" 8 #include "cc/base/math_util.h"
9 #include "cc/layers/layer_impl.h" 9 #include "cc/layers/layer_impl.h"
10 #include "cc/resources/layer_painter.h" 10 #include "cc/resources/layer_painter.h"
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetNonFastScrollableRegion( 521 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetNonFastScrollableRegion(
522 Region(gfx::Rect(1, 1, 2, 2)))); 522 Region(gfx::Rect(1, 1, 2, 2))));
523 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetHaveWheelEventHandlers(true)); 523 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetHaveWheelEventHandlers(true));
524 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetTransform( 524 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetTransform(
525 gfx::Transform(0.0, 0.0, 0.0, 0.0, 0.0, 0.0))); 525 gfx::Transform(0.0, 0.0, 0.0, 0.0, 0.0, 0.0)));
526 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetDoubleSided(false)); 526 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetDoubleSided(false));
527 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetDebugName("Test Layer")); 527 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetDebugName("Test Layer"));
528 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetDrawCheckerboardForMissingTiles( 528 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetDrawCheckerboardForMissingTiles(
529 !test_layer->DrawCheckerboardForMissingTiles())); 529 !test_layer->DrawCheckerboardForMissingTiles()));
530 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetForceRenderSurface(true)); 530 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetForceRenderSurface(true));
531 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetHideLayerAndSubtree(true));
531 532
532 EXPECT_SET_NEEDS_FULL_TREE_SYNC(1, test_layer->SetMaskLayer( 533 EXPECT_SET_NEEDS_FULL_TREE_SYNC(1, test_layer->SetMaskLayer(
533 dummy_layer1.get())); 534 dummy_layer1.get()));
534 EXPECT_SET_NEEDS_FULL_TREE_SYNC(1, test_layer->SetReplicaLayer( 535 EXPECT_SET_NEEDS_FULL_TREE_SYNC(1, test_layer->SetReplicaLayer(
535 dummy_layer2.get())); 536 dummy_layer2.get()));
536 537
537 // The above tests should not have caused a change to the needs_display flag. 538 // The above tests should not have caused a change to the needs_display flag.
538 EXPECT_FALSE(test_layer->NeedsDisplayForTesting()); 539 EXPECT_FALSE(test_layer->NeedsDisplayForTesting());
539 540
540 // As layers are removed from the tree, they will cause a tree sync. 541 // As layers are removed from the tree, they will cause a tree sync.
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
997 << "Flags: " << contents_opaque << ", " << layer_opaque << ", " 998 << "Flags: " << contents_opaque << ", " << layer_opaque << ", "
998 << host_opaque << "\n"; 999 << host_opaque << "\n";
999 } 1000 }
1000 } 1001 }
1001 } 1002 }
1002 } 1003 }
1003 } 1004 }
1004 1005
1005 } // namespace 1006 } // namespace
1006 } // namespace cc 1007 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_impl_unittest.cc ('k') | cc/trees/layer_tree_host_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698