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

Unified Diff: cc/trees/draw_property_utils.cc

Issue 2838033002: cc : Don't draw animating layers with singular screen space transform (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 | « cc/trees/draw_property_utils.h ('k') | 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 66b86d15bfbb71fe278ff96d684a3df45c2f11c0..94b2e5d15ad05fbb6f690b61ee2cee9b343f4f95 100644
--- a/cc/trees/draw_property_utils.cc
+++ b/cc/trees/draw_property_utils.cc
@@ -460,10 +460,9 @@ static inline bool LayerShouldBeSkippedInternal(
if (effect_node->has_render_surface && effect_node->subtree_has_copy_request)
return false;
- // If the layer transform is not invertible, it should be skipped.
- // TODO(ajuma): Correctly process subtrees with singular transform for the
- // case where we may animate to a non-singular transform and wish to
- // pre-raster.
+
+ // If the layer transform is not invertible, it should be skipped. In case the
+ // transform is animating and singular, we should not skip it.
return !transform_node->node_and_ancestors_are_animated_or_invertible ||
effect_node->hidden_by_backface_visibility || !effect_node->is_drawn;
}
@@ -800,15 +799,17 @@ void ConcatInverseSurfaceContentsScale(const EffectNode* effect_node,
1.0 / effect_node->surface_contents_scale.y());
}
-bool LayerShouldBeSkipped(LayerImpl* layer,
- const TransformTree& transform_tree,
- const EffectTree& effect_tree) {
+bool LayerShouldBeSkippedForDrawPropertiesComputation(
+ LayerImpl* layer,
+ const TransformTree& transform_tree,
+ const EffectTree& effect_tree) {
return LayerShouldBeSkippedInternal(layer, transform_tree, effect_tree);
}
-bool LayerShouldBeSkipped(Layer* layer,
- const TransformTree& transform_tree,
- const EffectTree& effect_tree) {
+bool LayerShouldBeSkippedForDrawPropertiesComputation(
+ Layer* layer,
+ const TransformTree& transform_tree,
+ const EffectTree& effect_tree) {
return LayerShouldBeSkippedInternal(layer, transform_tree, effect_tree);
}
@@ -818,8 +819,8 @@ void FindLayersThatNeedUpdates(LayerTreeHost* layer_tree_host,
const TransformTree& transform_tree = property_trees->transform_tree;
const EffectTree& effect_tree = property_trees->effect_tree;
for (auto* layer : *layer_tree_host) {
- if (!IsRootLayer(layer) &&
- LayerShouldBeSkipped(layer, transform_tree, effect_tree))
+ if (!IsRootLayer(layer) && LayerShouldBeSkippedForDrawPropertiesComputation(
+ layer, transform_tree, effect_tree))
continue;
bool layer_is_drawn =
@@ -844,7 +845,8 @@ void FindLayersThatNeedUpdates(LayerTreeImpl* layer_tree_impl,
for (auto* layer_impl : *layer_tree_impl) {
if (!IsRootLayer(layer_impl) &&
- LayerShouldBeSkipped(layer_impl, transform_tree, effect_tree))
+ LayerShouldBeSkippedForDrawPropertiesComputation(
+ layer_impl, transform_tree, effect_tree))
continue;
bool layer_is_drawn =
« no previous file with comments | « cc/trees/draw_property_utils.h ('k') | cc/trees/layer_tree_host_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698