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

Unified Diff: cc/trees/layer_tree_host_common.cc

Issue 2858853002: cc : Don't draw animating layers which are transparent but raster them. (Closed)
Patch Set: update comment and rebase Created 3 years, 8 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_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_common.cc
diff --git a/cc/trees/layer_tree_host_common.cc b/cc/trees/layer_tree_host_common.cc
index 25805379548abe1a16d109ef1be7a64a3b6d5e19..ca048445bd3d36693eab2f4100295db93e809a97 100644
--- a/cc/trees/layer_tree_host_common.cc
+++ b/cc/trees/layer_tree_host_common.cc
@@ -378,11 +378,22 @@ static void ComputeInitialRenderSurfaceList(
bool skip_for_invertibility = SkipForInvertibility(layer, property_trees);
- bool skip_layer = !is_root && (skip_draw_properties_computation ||
- skip_for_invertibility);
+ const EffectNode* effect_node =
+ property_trees->effect_tree.Node(layer->effect_tree_index());
+ bool has_animating_opacity_and_hidden =
+ effect_node->has_potential_opacity_animation &&
+ property_trees->effect_tree.EffectiveOpacity(effect_node) == 0.f &&
+ !effect_node->has_copy_request;
- layer->set_raster_even_if_not_in_rsll(skip_for_invertibility &&
- !skip_draw_properties_computation);
+ bool skip_layer = !is_root && (skip_draw_properties_computation ||
+ skip_for_invertibility ||
+ has_animating_opacity_and_hidden);
+
+ bool raster_even_if_not_in_rsll =
+ skip_draw_properties_computation
+ ? false
+ : has_animating_opacity_and_hidden || skip_for_invertibility;
+ layer->set_raster_even_if_not_in_rsll(raster_even_if_not_in_rsll);
if (skip_layer)
continue;
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698