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

Side by Side Diff: cc/layer_unittest.cc

Issue 11366089: cc: Remove all remaining use of WebCore Rect/Point/Size types from the compositor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove gyp entries for stubs Created 8 years, 1 month 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/layer_tree_host_unittest.cc ('k') | cc/math_util.h » ('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 "config.h" 5 #include "config.h"
6 6
7 #include "cc/layer.h" 7 #include "cc/layer.h"
8 8
9 #include "cc/keyframed_animation_curve.h" 9 #include "cc/keyframed_animation_curve.h"
10 #include "cc/layer_impl.h" 10 #include "cc/layer_impl.h"
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setMaskLayer(dumm yLayer.get())); 504 EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setMaskLayer(dumm yLayer.get()));
505 EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setOpacity(0.5)); 505 EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setOpacity(0.5));
506 EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setContentsOpaque (true)); 506 EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setContentsOpaque (true));
507 EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setPosition(gfx:: PointF(4, 9))); 507 EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setPosition(gfx:: PointF(4, 9)));
508 EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setReplicaLayer(d ummyLayer.get())); 508 EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setReplicaLayer(d ummyLayer.get()));
509 EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setSublayerTransf orm(WebTransformationMatrix(0, 0, 0, 0, 0, 0))); 509 EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setSublayerTransf orm(WebTransformationMatrix(0, 0, 0, 0, 0, 0)));
510 EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setScrollable(tru e)); 510 EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setScrollable(tru e));
511 EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setShouldScrollOn MainThread(true)); 511 EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setShouldScrollOn MainThread(true));
512 EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setNonFastScrolla bleRegion(gfx::Rect(1, 1, 2, 2))); 512 EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setNonFastScrolla bleRegion(gfx::Rect(1, 1, 2, 2)));
513 EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setHaveWheelEvent Handlers(true)); 513 EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setHaveWheelEvent Handlers(true));
514 EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setScrollPosition (IntPoint(10, 10))); 514 EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setScrollOffset(g fx::Vector2d(10, 10)));
515 EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setTransform(WebT ransformationMatrix(0, 0, 0, 0, 0, 0))); 515 EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setTransform(WebT ransformationMatrix(0, 0, 0, 0, 0, 0)));
516 EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setDoubleSided(fa lse)); 516 EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setDoubleSided(fa lse));
517 EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setDebugName("Tes t Layer")); 517 EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setDebugName("Tes t Layer"));
518 EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setDrawCheckerboa rdForMissingTiles(!testLayer->drawCheckerboardForMissingTiles())); 518 EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setDrawCheckerboa rdForMissingTiles(!testLayer->drawCheckerboardForMissingTiles()));
519 EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setForceRenderSur face(true)); 519 EXECUTE_AND_VERIFY_SET_NEEDS_COMMIT_BEHAVIOR(1, testLayer->setForceRenderSur face(true));
520 520
521 // The above tests should not have caused a change to the needsDisplay flag. 521 // The above tests should not have caused a change to the needsDisplay flag.
522 EXPECT_FALSE(testLayer->needsDisplay()); 522 EXPECT_FALSE(testLayer->needsDisplay());
523 523
524 // Test properties that should call setNeedsDisplay and setNeedsCommit 524 // Test properties that should call setNeedsDisplay and setNeedsCommit
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 scoped_refptr<MockLayer> layer(new MockLayer); 793 scoped_refptr<MockLayer> layer(new MockLayer);
794 EXPECT_FALSE(layer->needsDisplay()); 794 EXPECT_FALSE(layer->needsDisplay());
795 layer->setBounds(gfx::Size(0, 10)); 795 layer->setBounds(gfx::Size(0, 10));
796 EXPECT_FALSE(layer->needsDisplay()); 796 EXPECT_FALSE(layer->needsDisplay());
797 layer->setBounds(gfx::Size(10, 10)); 797 layer->setBounds(gfx::Size(10, 10));
798 EXPECT_TRUE(layer->needsDisplay()); 798 EXPECT_TRUE(layer->needsDisplay());
799 } 799 }
800 800
801 801
802 } // namespace 802 } // namespace
OLDNEW
« no previous file with comments | « cc/layer_tree_host_unittest.cc ('k') | cc/math_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698