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

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: Rebase. 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 | « 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 a85ff1dbb044255c7c5865aa66bb150a6afe45d9..58e361ed2b31a7329f6e984d15184d1123061e68 100644
--- a/cc/layer_tree_host_impl_unittest.cc
+++ b/cc/layer_tree_host_impl_unittest.cc
@@ -2389,6 +2389,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()));
@@ -3138,7 +3139,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);
@@ -3182,7 +3184,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);
« no previous file with comments | « 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