0

Revert "Avoid crashing in cc::CalculateDrawPropertiesInternal"

This reverts commit a8177a9cd2.

Reason for revert: Root cause has been fixed.

Original change's description:
> Avoid crashing in cc::CalculateDrawPropertiesInternal
> 
> Might lead to correctness bugs, but that is (likely) better than crashing.
> This code is soon to be replaced by BlinkGenPropertyTree, so this fix
> should be short-lived.
> 
> Bug: 939342
> Change-Id: Ia14b31420a1a78e738036a3d2c6bff4d3b46ec0f
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1554731
> Reviewed-by: weiliangc <weiliangc@chromium.org>
> Commit-Queue: Andrew Grieve <agrieve@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#648757}

TBR=danakj@chromium.org,weiliangc@chromium.org,agrieve@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 939342
Change-Id: If4ef9562c345d89ed4ae43d8e9a1bbc4c3dc0952
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1588703
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#654955}
This commit is contained in:
Chris Harrelson
2019-04-29 19:02:10 +00:00
committed by Commit Bot
parent 7238748ee0
commit 7bb74a42a5

@@ -326,23 +326,17 @@ static bool SkipForInvertibility(const LayerImpl* layer,
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.
if (non_root_copy_request) {
// Null check is a temporary fix for crasher: https://crbug.com/939342
if (effect_node == nullptr)
return false;
gfx::Transform from_target;
return !property_trees->GetFromTarget(
layer->transform_tree_index(),
effect_node->closest_ancestor_with_copy_request_id, &from_target);
}
// Null check is a temporary fix for crasher: https://crbug.com/939342
if (transform_node == nullptr)
return false;
return !transform_node->ancestors_are_invertible;
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(