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

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: 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') | cc/trees/property_tree.cc » ('J')
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 e91dded995895c30d906072953f6a4a1b6f1ddca..78043bffd43ae43b266f0ed2e9aefe293baf7775 100644
--- a/cc/trees/layer_tree_host_common.cc
+++ b/cc/trees/layer_tree_host_common.cc
@@ -358,11 +358,22 @@ static void ComputeInitialRenderSurfaceList(
property_trees->transform_tree.Node(layer->transform_tree_index());
bool skip_for_invertibility = !transform_node->ancestors_are_invertible;
- 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') | cc/trees/property_tree.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698