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

Unified Diff: cc/trees/layer_tree_host_common.cc

Issue 2856043002: cc : Layers with singular transforms and copy request should be drawn (Closed)
Patch Set: comments 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
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..e899ca816489af1c003007e3e7599a93e3679519 100644
--- a/cc/trees/layer_tree_host_common.cc
+++ b/cc/trees/layer_tree_host_common.cc
@@ -322,6 +322,28 @@ static void AddSurfaceToRenderSurfaceList(
}
}
+static bool SkipForInvertibility(const LayerImpl* layer,
+ PropertyTrees* property_trees) {
+ const TransformNode* transform_node =
+ property_trees->transform_tree.Node(layer->transform_tree_index());
+ const EffectNode* effect_node =
+ property_trees->effect_tree.Node(layer->effect_tree_index());
+ bool non_root_copy_request =
+ effect_node->closest_ancestor_with_copy_request_id >
+ EffectTree::kContentsRootNodeId;
+ gfx::Transform from_target;
+ // If there is a copy request, we check the invertibility of the transform
+ // between the node corresponding to the layer and the node corresponding to
+ // the copy request. Otherwise, we are interested in the invertibility of
+ // screen space transform which is already cached on the transform node.
+ return non_root_copy_request
+ ? !property_trees->GetFromTarget(
+ layer->transform_tree_index(),
+ effect_node->closest_ancestor_with_copy_request_id,
+ &from_target)
+ : !transform_node->ancestors_are_invertible;
+}
+
static void ComputeInitialRenderSurfaceList(
LayerTreeImpl* layer_tree_impl,
PropertyTrees* property_trees,
@@ -354,9 +376,7 @@ static void ComputeInitialRenderSurfaceList(
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_for_invertibility = SkipForInvertibility(layer, property_trees);
bool skip_layer = !is_root && (skip_draw_properties_computation ||
skip_for_invertibility);

Powered by Google App Engine
This is Rietveld 408576698