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

Unified Diff: cc/damage_tracker_unittest.cc

Issue 11316171: Don't create render passes for transparent images. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressing code reviews. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cc/delegated_renderer_layer_impl.h » ('j') | cc/delegated_renderer_layer_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/damage_tracker_unittest.cc
diff --git a/cc/damage_tracker_unittest.cc b/cc/damage_tracker_unittest.cc
index 42eaaafc729aaa1dc6ee4e9fbce5ffd3af2c116b..167c4c150fb521431228fa7b06981c29aa919209 100644
--- a/cc/damage_tracker_unittest.cc
+++ b/cc/damage_tracker_unittest.cc
@@ -113,6 +113,7 @@ scoped_ptr<LayerImpl> createTestTreeWithTwoSurfaces()
child1->setContentBounds(gfx::Size(30, 30));
child1->setOpacity(0.5); // with a child that drawsContent, this will cause the layer to create its own renderSurface.
child1->setDrawsContent(false); // this layer does not draw, but is intended to create its own renderSurface.
+ child1->setForceRenderSurface(true);
child2->setPosition(gfx::PointF(11, 11));
child2->setAnchorPoint(gfx::PointF());
@@ -723,6 +724,7 @@ TEST_F(DamageTrackerTest, verifyDamageForAddingAndRemovingRenderSurfaces)
//
clearDamageForAllSurfaces(root.get());
child1->setOpacity(1);
+ child1->setForceRenderSurface(false);
emulateDrawingOneFrame(root.get());
// Sanity check that there is only one surface now.
@@ -743,6 +745,7 @@ TEST_F(DamageTrackerTest, verifyDamageForAddingAndRemovingRenderSurfaces)
// Then change the tree so that the render surface is added back.
clearDamageForAllSurfaces(root.get());
child1->setOpacity(0.5);
+ child1->setForceRenderSurface(true);
emulateDrawingOneFrame(root.get());
// Sanity check that there is a new surface now.
« no previous file with comments | « no previous file | cc/delegated_renderer_layer_impl.h » ('j') | cc/delegated_renderer_layer_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698