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

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

Issue 15051011: Add CompositingReasons to compositor layer types. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch for landing 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') | webkit/renderer/compositor_bindings/compositor_bindings.gyp » ('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/base/thread.h" 9 #include "cc/base/thread.h"
10 #include "cc/layers/layer_impl.h" 10 #include "cc/layers/layer_impl.h"
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetScrollOffset( 519 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetScrollOffset(
520 gfx::Vector2d(10, 10))); 520 gfx::Vector2d(10, 10)));
521 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetShouldScrollOnMainThread(true)); 521 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetShouldScrollOnMainThread(true));
522 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetNonFastScrollableRegion( 522 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetNonFastScrollableRegion(
523 Region(gfx::Rect(1, 1, 2, 2)))); 523 Region(gfx::Rect(1, 1, 2, 2))));
524 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetHaveWheelEventHandlers(true)); 524 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetHaveWheelEventHandlers(true));
525 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetTransform( 525 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetTransform(
526 gfx::Transform(0.0, 0.0, 0.0, 0.0, 0.0, 0.0))); 526 gfx::Transform(0.0, 0.0, 0.0, 0.0, 0.0, 0.0)));
527 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetDoubleSided(false)); 527 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetDoubleSided(false));
528 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetDebugName("Test Layer")); 528 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetDebugName("Test Layer"));
529 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetCompositingReasons(
530 kCompositingReasonRoot));
529 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetDrawCheckerboardForMissingTiles( 531 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetDrawCheckerboardForMissingTiles(
530 !test_layer->DrawCheckerboardForMissingTiles())); 532 !test_layer->DrawCheckerboardForMissingTiles()));
531 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetForceRenderSurface(true)); 533 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetForceRenderSurface(true));
532 534
533 EXPECT_SET_NEEDS_FULL_TREE_SYNC(1, test_layer->SetMaskLayer( 535 EXPECT_SET_NEEDS_FULL_TREE_SYNC(1, test_layer->SetMaskLayer(
534 dummy_layer1.get())); 536 dummy_layer1.get()));
535 EXPECT_SET_NEEDS_FULL_TREE_SYNC(1, test_layer->SetReplicaLayer( 537 EXPECT_SET_NEEDS_FULL_TREE_SYNC(1, test_layer->SetReplicaLayer(
536 dummy_layer2.get())); 538 dummy_layer2.get()));
537 539
538 // The above tests should not have caused a change to the needs_display flag. 540 // The above tests should not have caused a change to the needs_display flag.
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 layer->SetLayerTreeHost(layer_tree_host.get()); 973 layer->SetLayerTreeHost(layer_tree_host.get());
972 AssertLayerTreeHostMatchesForSubtree(layer.get(), layer_tree_host.get()); 974 AssertLayerTreeHostMatchesForSubtree(layer.get(), layer_tree_host.get());
973 975
974 // Case 3: with a LayerTreeHost where accelerated animation is disabled, the 976 // Case 3: with a LayerTreeHost where accelerated animation is disabled, the
975 // animation should be rejected. 977 // animation should be rejected.
976 EXPECT_FALSE(AddTestAnimation(layer.get())); 978 EXPECT_FALSE(AddTestAnimation(layer.get()));
977 } 979 }
978 980
979 } // namespace 981 } // namespace
980 } // namespace cc 982 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | webkit/renderer/compositor_bindings/compositor_bindings.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698