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

Unified Diff: cc/layer_tree_host_impl_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 review. 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
« cc/layer_tree_host_common.cc ('K') | « cc/layer_tree_host_common_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_tree_host_impl_unittest.cc
diff --git a/cc/layer_tree_host_impl_unittest.cc b/cc/layer_tree_host_impl_unittest.cc
index 859c9b72198d8d8548d79ff55f56ae7b8e4474b9..dc0dcc5d4404db83467535b453da615794804534 100644
--- a/cc/layer_tree_host_impl_unittest.cc
+++ b/cc/layer_tree_host_impl_unittest.cc
@@ -2369,6 +2369,7 @@ static scoped_ptr<LayerTreeHostImpl> setupLayersForOpacity(bool partialSwap, Lay
child->setContentBounds(child->bounds());
child->setVisibleContentRect(childRect);
child->setDrawsContent(false);
+ child->setForceRenderSurface(true);
grandChild->setAnchorPoint(gfx::PointF(0, 0));
grandChild->setPosition(gfx::Point(grandChildRect.x(), grandChildRect.y()));
@@ -3118,7 +3119,8 @@ static void setupLayersForTextureCaching(LayerTreeHostImpl* layerTreeHostImpl, L
// It will contain other layers that draw content.
addDrawingLayerTo(intermediateLayerPtr, 3, gfx::Rect(10, 10, rootSize.width(), rootSize.height()), &surfaceLayerPtr);
surfaceLayerPtr->setDrawsContent(false); // only children draw content
- surfaceLayerPtr->setOpacity(0.5f); // This will cause it to have a surface
+ surfaceLayerPtr->setOpacity(0.5f);
+ surfaceLayerPtr->setForceRenderSurface(true); // This will cause it to have a surface
// Child of the surface layer will produce some quads
addDrawingLayerTo(surfaceLayerPtr, 4, gfx::Rect(5, 5, rootSize.width() - 25, rootSize.height() - 25), &childPtr);
@@ -3162,7 +3164,8 @@ TEST_P(LayerTreeHostImplTest, textureCachingWithClipping)
// Surface layer is the layer that changes its opacity
// It will contain other layers that draw content.
- surfaceLayerPtr->setOpacity(0.5f); // This will cause it to have a surface
+ surfaceLayerPtr->setOpacity(0.5f);
+ surfaceLayerPtr->setForceRenderSurface(true); // This will cause it to have a surface
addDrawingLayerTo(surfaceLayerPtr, 4, gfx::Rect(0, 0, 100, 3), 0);
addDrawingLayerTo(surfaceLayerPtr, 5, gfx::Rect(0, 97, 100, 3), 0);
« cc/layer_tree_host_common.cc ('K') | « cc/layer_tree_host_common_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698