Commit 96dce73e authored by Tien-Ren Chen's avatar Tien-Ren Chen Committed by Commit Bot

[Blink/SPv2] Remove workarounds that forced mask compositing

We previously forced every CSS mask to composite due to not handling
grouping of effects. This is no longer the case.

BUG=683425

Change-Id: Iec8d474794825f8ee7ce559d0b6d416403477464
Reviewed-on: https://chromium-review.googlesource.com/568249Reviewed-by: default avatarChris Harrelson <chrishtr@chromium.org>
Commit-Queue: Tien-Ren Chen <trchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#487340}
parent 82447e11
......@@ -582,11 +582,6 @@ void PaintPropertyTreeBuilder::UpdateEffect(
FloatRoundedRect(mask_clip));
local_clip_added_or_removed |= result.NewNodeCreated();
output_clip = properties.MaskClip();
// TODO(crbug.com/683425): PaintArtifactCompositor does not handle
// grouping (i.e. descendant-dependent compositing reason) properly
// yet. This forces masked subtree always create a layer for now.
compositing_reasons |= kCompositingReasonIsolateCompositedDescendants;
} else {
force_subtree_update |= properties.ClearMaskClip();
}
......@@ -607,15 +602,10 @@ void PaintPropertyTreeBuilder::UpdateEffect(
object.UniqueId(), CompositorElementIdNamespace::kPrimary));
force_subtree_update |= result.NewNodeCreated();
if (has_mask) {
// TODO(crbug.com/683425): PaintArtifactCompositor does not handle
// grouping (i.e. descendant-dependent compositing reason) properly
// yet. Adding CompositingReasonSquashingDisallowed forces mask not
// getting squashed into a child effect. Have no compositing reason
// otherwise.
auto result = properties.UpdateMask(
properties.Effect(), context.current.transform, output_clip,
mask_color_filter, CompositorFilterOperations(), 1.f,
SkBlendMode::kDstIn, kCompositingReasonSquashingDisallowed,
SkBlendMode::kDstIn, kCompositingReasonNone,
CompositorElementIdFromLayoutObjectId(
object.UniqueId(), CompositorElementIdNamespace::kEffectMask));
force_subtree_update |= result.NewNodeCreated();
......
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