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

Unified Diff: cc/trees/layer_tree_host_common.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.cc ('k') | 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 973885887424b18c70560375d5585bb2c6e992ee..44d324b9e8f266fcc70a29bd59a3dd2d419ddc78 100644
--- a/cc/trees/layer_tree_host_common.cc
+++ b/cc/trees/layer_tree_host_common.cc
@@ -20,6 +20,7 @@
#include "cc/trees/layer_tree_impl.h"
#include "cc/trees/property_tree_builder.h"
#include "cc/trees/scroll_node.h"
+#include "cc/trees/transform_node.h"
#include "ui/gfx/geometry/rect_conversions.h"
#include "ui/gfx/geometry/vector2d_conversions.h"
#include "ui/gfx/transform.h"
@@ -294,9 +295,20 @@ static void ComputeInitialRenderSurfaceLayerList(
layer->set_is_drawn_render_surface_layer_list_member(false);
bool is_root = layer_tree_impl->IsRootLayer(layer);
- bool skip_layer = !is_root && draw_property_utils::LayerShouldBeSkipped(
- layer, property_trees->transform_tree,
- property_trees->effect_tree);
+
+ bool skip_draw_properties_computation =
+ draw_property_utils::LayerShouldBeSkippedForDrawPropertiesComputation(
+ layer, property_trees->transform_tree, property_trees->effect_tree);
+
+ const TransformNode* transform_node =
+ 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);
+
+ layer->set_raster_even_if_not_in_rsll(skip_for_invertibility &&
+ !skip_draw_properties_computation);
if (skip_layer)
continue;
« no previous file with comments | « cc/trees/draw_property_utils.cc ('k') | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698