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

Unified Diff: cc/layer_tree_host_common.cc

Issue 11316171: Don't create render passes for transparent images. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_tree_host_common.cc
diff --git a/cc/layer_tree_host_common.cc b/cc/layer_tree_host_common.cc
index ca7d45050f85c0857e5f88a4def5818ef1b5374e..6ccca2cb5a16db4846959b9de6296afd53b68a77 100644
--- a/cc/layer_tree_host_common.cc
+++ b/cc/layer_tree_host_common.cc
@@ -259,7 +259,7 @@ static bool subtreeShouldRenderToSeparateSurface(LayerType* layer, bool axisAlig
return true;
// If the layer has opacity != 1 and does not have a preserves-3d transform style.
- if (layer->opacity() != 1 && !layer->preserves3D() && descendantDrawsContent)
+ if (layer->opacity() != 1 && !layer->preserves3D() && layer->drawsContent() && descendantDrawsContent)
return true;
return false;
@@ -484,10 +484,10 @@ static void calculateDrawTransformsInternal(LayerType* layer, const WebTransform
gfx::Rect clipRectForSubtree;
bool subtreeShouldBeClipped = false;
-
+
float drawOpacity = layer->opacity();
bool drawOpacityIsAnimating = layer->opacityIsAnimating();
- if (layer->parent() && layer->parent()->preserves3D()) {
+ if (layer->parent()) {
danakj 2012/11/26 18:35:26 This should be replaced with a check for something
shawnsingh 2012/11/26 18:52:57 danakj@ is this true? we're using the parent laye
danakj 2012/11/26 18:57:34 Oh that is true. I thought we had the preserves3D
drawOpacity *= layer->parent()->drawOpacity();
drawOpacityIsAnimating |= layer->parent()->drawOpacityIsAnimating();
}
« 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