Commit af82c617 authored by Xianzhu Wang's avatar Xianzhu Wang Committed by Commit Bot

[BlinkGenPropertyTrees] Don't crash on rare clip-escaping case

In pre-CompositeAfterPaint we have rare cases that a clip escapes an
effect's output clip. We have tolerated non-composited cases in
PaintChunksToCcLayers [1], and now we also tolerate composited cases
in PropertyTreeManager.

[1] https://cs.chromium.org/chromium/src/third_party/blink/renderer/platform/graphics/compositing/paint_chunks_to_cc_layer.cc?rcl=e4eadfd6f18ded4d369b8e0e7a7ef93018ff2b85&l=335

Bug: 927556
Change-Id: I0619116ab3b9e56bf839a849c51e8418e929d40c
Reviewed-on: https://chromium-review.googlesource.com/c/1456292
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: default avatarChris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#630475}
parent 7a8b35fb
......@@ -588,7 +588,14 @@ SkBlendMode PropertyTreeManager::SynthesizeCcEffectsForClipsIfNeeded(
const auto& lca =
LowestCommonAncestor(*current_.clip, *target_clip).Unalias();
while (current_.clip != &lca) {
DCHECK(IsCurrentCcEffectSynthetic());
if (!IsCurrentCcEffectSynthetic()) {
// This happens in pre-CompositeAfterPaint due to some clip-escaping
// corner cases that are very difficult to fix in legacy architecture.
// In CompositeAfterPaint this should never happen.
if (RuntimeEnabledFeatures::CompositeAfterPaintEnabled())
NOTREACHED();
return delegated_blend;
}
const auto* pre_exit_clip = current_.clip;
CloseCcEffect();
// We may run past the lowest common ancestor because it may not have
......
......@@ -89,6 +89,7 @@ Bug(none) compositing/layer-creation/scroll-partial-update.html [ Failure ]
Bug(none) compositing/layer-creation/spanOverlapsCanvas.html [ Failure ]
Bug(none) compositing/layer-creation/squashing-into-ancestor-clipping-layer-change.html [ Failure ]
Bug(none) compositing/masks/mask-with-removed-filters.html [ Failure ]
Bug(none) compositing/nested-multicol-mask-composited-filter-crash.html [ Crash ]
Bug(none) compositing/overflow/accelerated-overflow-scroll-should-not-affect-perspective.html [ Failure ]
Bug(none) compositing/overflow/accelerated-scrolling-with-clip-path.html [ Failure ]
Bug(none) compositing/overflow/avoid-ancestor-clip-for-scroll-children.html [ Failure ]
......
<!DOCTYPE html>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script>test(function(){});</script>
<style>
@keyframes Rotation{
0% { transform: rotate(0deg) }
100% { transform: rotate(360deg) }
}
</style>
<div style="columns: 82">
<div id="target" style="columns: 82; visibility: hidden; -webkit-mask: url(#foo); width: 10px">
<div style="animation: rotation 1s infinite; filter: blur(5px)"></div>
</div>
</div>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment