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

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: Remove comments 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
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 77b327b59b16814ecb6a4f7edc788ab83cb267f8..71a9d90072dea453ccd68931e8dd1647f473ae9c 100644
--- a/cc/trees/layer_tree_host_common.cc
+++ b/cc/trees/layer_tree_host_common.cc
@@ -255,13 +255,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
@@ -281,16 +274,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.node_or_ancestor_has_backface_visible_surface;
}
static bool LayerShouldBeSkipped(LayerImpl* layer,

Powered by Google App Engine
This is Rietveld 408576698