New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 763587 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

[SPv175] Effect output clip needs to be restructured

Project Member Reported by trchen@chromium.org, Sep 9 2017

Issue description

Currently we use the parent effect's input clip as a child effect's output clip when the child effect doesn't have an intrinsic clip. For example:

<!DOCTYPE html>
<div style="opacity:0.5;">
  Foo
</div>

The opacity effect's output clip will be the root node, while the chunk "Foo" will be clipped by the frame clip.

This causes a problem when we use property tree to paint in SPv1 (a.k.a. SPv175), because the layer state included the frame clip. When we convert the effect node into cc display item, a DCHECK will fail due to the layer clip being deeper than the output clip of the effect.

This problem applies to clip other than frame clip as well. Say we have
<div style="overflow:hidden;">
  <div style="will-change:opacity;">
    <div style="opacity:0.5;">
      
    </div>
  </div>
</div>

The middle element creates a compositing layer, and its layer state will include the overflow clip from the outer element. We can't simply set the output clip of inner opacity effect to the layer clip because out-of-flow descendants can potentially escape the clip.

Proposal:
Set output clip to nullptr if an effect doesn't have intrinsic clip. In PAC and PaintChunksToCcLayer the effective output clip will inherit from the parent effect (as before the proposal), or the layer clip, whichever is deeper.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Sep 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/45aba4086fd1d1c0e55d8d756786364d7d0aa0ef

commit 45aba4086fd1d1c0e55d8d756786364d7d0aa0ef
Author: Tien-Ren Chen <trchen@chromium.org>
Date: Sat Sep 16 01:14:11 2017

[Blink] Make output clip nullptr for effects with no intrinsic clip

Previously we set the output clip to the parent effect's input clip
(a convservative maximum input region that can affect an effect's
output) for effects that have no intrinsic output clip. This caused a
problem because with SPv175 we often create compositing layers that have
deeper clip than the parent effect's input clip, while is still a common
ancestor of all contained chunks.

This also improves compositing decision made by SPv2 because it allows
more effects to be decomposited. For a very simple example:

<div style="opacity:0.5">Foo</div>
<div style="height:1000px;">Make frame scrollable.</div>

This effect couldn't be decomposited previously, due to its output clip
would be the input clip of the root effect, i.e., the root clip, but the
text "Foo" must have the frame clip applied. However the frame clip
couldn't be decomposited because it is in a different transform space
from the text. With this CL, the removal of output clip also removed
the implied input clip, therefore the frame clip doesn't need to be
decomposited for the effect to decomposite.

BUG= 763587 , 765003 

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I22ba44a3bfb1ec668ec93d5b07f06949094b4faf
Reviewed-on: https://chromium-review.googlesource.com/660785
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: Tien-Ren Chen <trchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#502461}
[modify] https://crrev.com/45aba4086fd1d1c0e55d8d756786364d7d0aa0ef/third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2
[delete] https://crrev.com/3de644f2054e1c1c13df94dc9ab9c1534dcd871c/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/column-float-under-stacked-inline-expected.png
[delete] https://crrev.com/3de644f2054e1c1c13df94dc9ab9c1534dcd871c/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/compositing/become-overlay-composited-layer-expected.png
[modify] https://crrev.com/45aba4086fd1d1c0e55d8d756786364d7d0aa0ef/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/float-overflow-expected.txt
[modify] https://crrev.com/45aba4086fd1d1c0e55d8d756786364d7d0aa0ef/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/float-overflow-right-expected.txt
[modify] https://crrev.com/45aba4086fd1d1c0e55d8d756786364d7d0aa0ef/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/remove-inline-layer-after-layout-expected.txt
[delete] https://crrev.com/3de644f2054e1c1c13df94dc9ab9c1534dcd871c/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/svg/W3C-SVG-1.1/animate-elem-22-b-expected.png
[delete] https://crrev.com/3de644f2054e1c1c13df94dc9ab9c1534dcd871c/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/svg/custom/marker-opacity-expected.png
[delete] https://crrev.com/3de644f2054e1c1c13df94dc9ab9c1534dcd871c/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/svg/custom/text-image-opacity-expected.png
[modify] https://crrev.com/45aba4086fd1d1c0e55d8d756786364d7d0aa0ef/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
[modify] https://crrev.com/45aba4086fd1d1c0e55d8d756786364d7d0aa0ef/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.h
[modify] https://crrev.com/45aba4086fd1d1c0e55d8d756786364d7d0aa0ef/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
[modify] https://crrev.com/45aba4086fd1d1c0e55d8d756786364d7d0aa0ef/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
[modify] https://crrev.com/45aba4086fd1d1c0e55d8d756786364d7d0aa0ef/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp
[modify] https://crrev.com/45aba4086fd1d1c0e55d8d756786364d7d0aa0ef/third_party/WebKit/Source/platform/graphics/compositing/PaintChunksToCcLayer.cpp
[modify] https://crrev.com/45aba4086fd1d1c0e55d8d756786364d7d0aa0ef/third_party/WebKit/Source/platform/graphics/compositing/PaintChunksToCcLayerTest.cpp
[modify] https://crrev.com/45aba4086fd1d1c0e55d8d756786364d7d0aa0ef/third_party/WebKit/Source/platform/graphics/compositing/PropertyTreeManager.cpp
[modify] https://crrev.com/45aba4086fd1d1c0e55d8d756786364d7d0aa0ef/third_party/WebKit/Source/platform/graphics/paint/GeometryMapper.cpp

Comment 2 by trchen@chromium.org, Sep 16 2017

Status: Fixed (was: Assigned)

Sign in to add a comment