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

Unified Diff: cc/trees/draw_property_utils.cc

Issue 1307713002: cc: Allow transparent layers with background filters to render (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update test comment Created 5 years, 4 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 | cc/trees/layer_tree_host_common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/draw_property_utils.cc
diff --git a/cc/trees/draw_property_utils.cc b/cc/trees/draw_property_utils.cc
index a44feffc47e6141f87dfda644fe420053a367cb4..17152953e58812d682c48a50c2d3a88f78d5ab13 100644
--- a/cc/trees/draw_property_utils.cc
+++ b/cc/trees/draw_property_utils.cc
@@ -270,6 +270,11 @@ static inline bool SubtreeShouldBeSkipped(LayerImpl* layer,
layer->HasPotentiallyRunningOpacityAnimation())
return false;
+ // If layer has a background filter, don't skip the layer, even it the
+ // opacity is 0.
+ if (!layer->background_filters().IsEmpty())
+ return false;
+
// The opacity of a layer always applies to its children (either implicitly
// via a render surface or explicitly if the parent preserves 3D), so the
// entire subtree can be skipped if this layer is fully transparent.
@@ -298,6 +303,11 @@ static inline bool SubtreeShouldBeSkipped(Layer* layer,
IsSurfaceBackFaceVisible(layer, tree))
return true;
+ // If layer has a background filter, don't skip the layer, even it the
+ // opacity is 0.
+ if (!layer->background_filters().IsEmpty())
+ return false;
+
// If the opacity is being animated then the opacity on the main thread is
// unreliable (since the impl thread may be using a different opacity), so it
// should not be trusted.
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698