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

Unified Diff: cc/layers/layer_impl_unittest.cc

Issue 2123793002: cc: Don't always rebuild property trees in LayerImplTests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer_impl_unittest.cc
diff --git a/cc/layers/layer_impl_unittest.cc b/cc/layers/layer_impl_unittest.cc
index ed3c43ee659e140f4ad4651db023722f490f7c8b..9868cf8b183bd9b31cfa08676c02d9698f4de187 100644
--- a/cc/layers/layer_impl_unittest.cc
+++ b/cc/layers/layer_impl_unittest.cc
@@ -82,8 +82,6 @@ namespace {
#define VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(code_to_test) \
root->layer_tree_impl()->ResetAllChangeTracking(); \
- host_impl.active_tree()->property_trees()->needs_rebuild = true; \
- host_impl.active_tree()->BuildLayerListAndPropertyTreesForTesting(); \
host_impl.ForcePrepareToDraw(); \
EXPECT_FALSE(host_impl.active_tree()->needs_update_draw_properties()); \
code_to_test; \
@@ -91,8 +89,6 @@ namespace {
#define VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(code_to_test) \
root->layer_tree_impl()->ResetAllChangeTracking(); \
- host_impl.active_tree()->property_trees()->needs_rebuild = true; \
- host_impl.active_tree()->BuildLayerListAndPropertyTreesForTesting(); \
host_impl.ForcePrepareToDraw(); \
EXPECT_FALSE(host_impl.active_tree()->needs_update_draw_properties()); \
code_to_test; \
@@ -286,6 +282,7 @@ TEST(LayerImplTest, VerifyNeedsUpdateDrawProperties) {
// Related scrolling functions.
VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetBounds(large_size));
VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(layer->SetBounds(large_size));
+ host_impl.active_tree()->BuildLayerListAndPropertyTreesForTesting();
VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(layer->ScrollBy(arbitrary_vector2d));
VERIFY_NO_NEEDS_UPDATE_DRAW_PROPERTIES(layer->ScrollBy(gfx::Vector2d()));
VERIFY_NEEDS_UPDATE_DRAW_PROPERTIES(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698