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

Unified Diff: cc/trees/layer_tree_host_common.cc

Issue 1811423002: SubtreeShouldBeSkipped uses information from property trees (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 9 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 399fe5c79abfed3d8a54c956ffc250202457a709..2b5c66bcb78269ae949dbd56a628122b9e8dc3eb 100644
--- a/cc/trees/layer_tree_host_common.cc
+++ b/cc/trees/layer_tree_host_common.cc
@@ -258,13 +258,6 @@ static inline bool LayerIsInExisting3DRenderingContext(LayerType* layer) {
(layer->parent()->sorting_context_id() == layer->sorting_context_id());
}
-static bool IsRootLayerOfNewRenderingContext(LayerImpl* layer) {
- if (layer->parent())
- return !layer->parent()->Is3dSorted() && layer->Is3dSorted();
-
- return layer->Is3dSorted();
-}
-
static bool IsLayerBackFaceVisible(LayerImpl* layer,
const TransformTree& transform_tree) {
// The current W3C spec on CSS transforms says that backface visibility should
@@ -284,16 +277,10 @@ static bool IsLayerBackFaceVisible(LayerImpl* layer,
static bool IsSurfaceBackFaceVisible(LayerImpl* layer,
const gfx::Transform& draw_transform) {
- if (LayerIsInExisting3DRenderingContext(layer))
- return draw_transform.IsBackFaceVisible();
-
- if (IsRootLayerOfNewRenderingContext(layer))
- return layer->transform().IsBackFaceVisible();
-
- // If the render_surface is not part of a new or existing rendering context,
- // then the layers that contribute to this surface will decide back-face
- // visibility for themselves.
- return false;
+ return layer->layer_tree_impl()
+ ->property_trees()
+ ->effect_tree.Node(layer->effect_tree_index())
+ ->data.hidden_by_backface_visibility;
}
static bool LayerShouldBeSkipped(LayerImpl* layer,
@@ -350,7 +337,13 @@ static inline bool SubtreeShouldBeSkipped(LayerImpl* layer,
// 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 (!HasInvertibleOrAnimatedTransform(layer))
+ TransformNode* node =
+ layer->layer_tree_impl()->property_trees()->transform_tree.Node(
+ layer->transform_tree_index());
+ bool has_invertible_transform =
+ node->data.is_invertible && node->data.ancestors_are_invertible;
+ if (!(has_invertible_transform ||
+ layer->HasPotentiallyRunningTransformAnimation()))
return true;
// When we need to do a readback/copy of a layer's output, we can not skip
« 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