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

Unified Diff: cc/layer_impl_unittest.cc

Issue 11529006: [cc] Fold more update calls into updateDrawProperties (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cc/layer_tree_host_impl.h » ('j') | cc/layer_tree_host_impl.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_impl_unittest.cc
diff --git a/cc/layer_impl_unittest.cc b/cc/layer_impl_unittest.cc
index cc284c7d32a14b5ebddc99cee339448af4bd6f48..3047d5a1673dd6e751370c4fad93696fefa04530 100644
--- a/cc/layer_impl_unittest.cc
+++ b/cc/layer_impl_unittest.cc
@@ -53,13 +53,13 @@ namespace {
#define VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(codeToTest) \
root->resetAllChangeTrackingForSubtree(); \
- hostImpl.resetNeedsUpdateDrawPropertiesForTesting(); \
+ hostImpl.forcePrepareToDraw(); \
codeToTest; \
EXPECT_TRUE(hostImpl.needsUpdateDrawProperties());
#define VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(codeToTest) \
root->resetAllChangeTrackingForSubtree(); \
- hostImpl.resetNeedsUpdateDrawPropertiesForTesting(); \
+ hostImpl.forcePrepareToDraw(); \
codeToTest; \
EXPECT_FALSE(hostImpl.needsUpdateDrawProperties());
@@ -200,7 +200,7 @@ TEST(LayerImplTest, VerifyNeedsUpdateDrawProperties)
VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(root->scrollBy(arbitraryVector2d));
VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(root->scrollBy(gfx::Vector2d()));
root->setScrollDelta(gfx::Vector2d(0, 0));
- hostImpl.resetNeedsUpdateDrawPropertiesForTesting();
+ hostImpl.forcePrepareToDraw();
VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(root->setScrollDelta(arbitraryVector2d));
VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(root->setScrollDelta(arbitraryVector2d));
VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(root->setScrollOffset(arbitraryVector2d));
« no previous file with comments | « no previous file | cc/layer_tree_host_impl.h » ('j') | cc/layer_tree_host_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698