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

Issue 792769 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

[SPv175+] ClipPaintPropertyNode should model clip-path

Project Member Reported by trchen@chromium.org, Dec 7 2017

Issue description

Currently we don't have anything in property tree that models path-based clip-path. An optional field on ClipPaintPropertyNode should be added.

The list of pending tasks:
* PaintPropertyTreeBuilder should use path-based clip-path whenever possible.
* ClipPathClipper should use path-based clip-path clip node when it's available.
* PaintChunksToCcLayer should convert path-based clip-path into paired display items. (trivial)
* [SPv2 only] PropertyTreeManager should synthesize composited clip nodes with clip-path as cc effect nodes, similar to how composited border radius is done.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jan 30 2018

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

commit 8d915c015a7af5857b0985195ae846926e54ab60
Author: Tien-Ren Chen <trchen@chromium.org>
Date: Tue Jan 30 05:33:34 2018

[Blink/SPv175+] Add path support to clip property node

This CL adds an optional path field on ClipPaintPropertyNode. For
non-composited clip nodes, the clip path is implemented as cc::ClipPathOp.
For composited clip nodes, the clip path will be synthesized as a mask
layer, similar to how border radius is implemented.

This CL itself doesn't implement CSS clip-path yet, which will be done
as a follow-up CL.

BUG= 792769 

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I8a69b85491ffa08c8f6dab3f695a4b13f7a88088
Reviewed-on: https://chromium-review.googlesource.com/885242
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532776}
[modify] https://crrev.com/8d915c015a7af5857b0985195ae846926e54ab60/third_party/WebKit/Source/platform/graphics/Path.h
[modify] https://crrev.com/8d915c015a7af5857b0985195ae846926e54ab60/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
[modify] https://crrev.com/8d915c015a7af5857b0985195ae846926e54ab60/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp
[modify] https://crrev.com/8d915c015a7af5857b0985195ae846926e54ab60/third_party/WebKit/Source/platform/graphics/compositing/PaintChunksToCcLayer.cpp
[modify] https://crrev.com/8d915c015a7af5857b0985195ae846926e54ab60/third_party/WebKit/Source/platform/graphics/compositing/PaintChunksToCcLayerTest.cpp
[modify] https://crrev.com/8d915c015a7af5857b0985195ae846926e54ab60/third_party/WebKit/Source/platform/graphics/compositing/PropertyTreeManager.cpp
[modify] https://crrev.com/8d915c015a7af5857b0985195ae846926e54ab60/third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.cpp
[modify] https://crrev.com/8d915c015a7af5857b0985195ae846926e54ab60/third_party/WebKit/Source/platform/graphics/paint/ClipPaintPropertyNode.h

Project Member

Comment 2 by bugdroid1@chromium.org, Feb 2 2018

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

commit 763f7c9cd7f480cd785a897050b6a1c36d872f18
Author: Tien-Ren Chen <trchen@chromium.org>
Date: Fri Feb 02 09:38:44 2018

[Blink/SPv175+] Add support for CSS clip-path

This CL adds clip-path support to SPv175+ by the following changes:

1. PropertyTreeBuilder now builds a clip node (ClipPathClip) or a effect
   node (ClipPath), depend on whether path-based or mask-based clip path
   should be used.

2. A per-fragment clip-path cache that saves the bounding box and (if
   available) the path of path-based clip path. This cache will maintain
   the same pointer identity across document lifecycles so that clip
   node comparison during raster invalidation won't incur expensive
   by-value comparison for paths.

3. ClipPathClipper now paints path-based clip path in appropriate property
   state. HTML-based contents apply property state in a bundle by local
   border box property (unchanged), while SVG-based contents apply
   property states manually in SVGPaintContext.

4. Implement SPv1 composited mask layer adjustment. The hierarchy of
   effect tree and clip tree are slightly different because in SPv1
   composited clip path are always applied to a mask layer then apply
   to actual contents indirectly.

BUG= 769942 , 792769 

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I8dcd5fad685067dc22efda9dedfd6ab6366a26a7
Reviewed-on: https://chromium-review.googlesource.com/896607
Commit-Queue: Tien-Ren Chen <trchen@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534009}
[modify] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v175
[modify] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2
[modify] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/LayoutTests/css3/masking/clip-path-circle-filter-expected.txt
[modify] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/LayoutTests/css3/masking/clip-path-circle-relative-overflow-expected.txt
[modify] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/LayoutTests/css3/masking/clip-path-ellipse-expected.txt
[modify] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/LayoutTests/css3/masking/clip-path-polygon-evenodd-expected.txt
[modify] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/LayoutTests/css3/masking/clip-path-polygon-expected.txt
[modify] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/LayoutTests/css3/masking/clip-path-polygon-nonzero-expected.txt
[add] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v175/svg/W3C-SVG-1.1/masking-path-02-b-expected.png
[add] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v175/svg/custom/masking-clipping-hidpi-expected.png
[add] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v175/svg/custom/use-on-clip-path-with-transformation-expected.png
[add] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v175/svg/transforms/svg-css-transforms-clip-path-expected.png
[add] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v175/svg/zoom/page/zoom-clip-path-expected.png
[add] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v175/virtual/prefer_compositing_to_lcd_text/compositing/overflow/accelerated-scrolling-with-clip-path-expected.txt
[add] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v175/virtual/prefer_compositing_to_lcd_text/compositing/overflow/accelerated-scrolling-with-clip-path-text-expected.txt
[modify] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/LayoutTests/paint/invalidation/svg/mask-clip-target-transform-expected.txt
[add] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/LayoutTests/platform/linux/virtual/spv175/compositing/images/direct-image-clip-path-expected.png
[add] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/LayoutTests/platform/linux/virtual/spv175/compositing/images/direct-image-dynamic-clip-path-expected.png
[add] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/LayoutTests/platform/linux/virtual/spv175/compositing/overflow/accelerated-scrolling-with-clip-path-expected.txt
[add] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/LayoutTests/platform/linux/virtual/spv175/compositing/overflow/accelerated-scrolling-with-clip-path-text-expected.txt
[add] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/LayoutTests/platform/linux/virtual/spv175/paint/clipath/clip-path-with-background-and-box-behind-expected.txt
[add] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/LayoutTests/platform/linux/virtual/spv175/paint/invalidation/clip/clip-path-constant-repaint-expected.txt
[add] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/LayoutTests/platform/linux/virtual/spv175/paint/invalidation/clip/clip-path-resize-expected.txt
[add] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/LayoutTests/platform/linux/virtual/spv175/paint/invalidation/svg/clip-path-child-changes-expected.txt
[add] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/LayoutTests/platform/linux/virtual/spv175/paint/invalidation/svg/clip-path-href-changes-expected.txt
[add] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/LayoutTests/platform/linux/virtual/spv175/paint/invalidation/svg/clip-path-id-changes-expected.txt
[add] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/LayoutTests/platform/linux/virtual/spv175/paint/invalidation/svg/clip-path-units-changes-expected.txt
[add] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/LayoutTests/platform/linux/virtual/spv175/paint/invalidation/svg/image-with-clip-path-expected.txt
[add] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/LayoutTests/platform/linux/virtual/spv175/paint/invalidation/svg/js-late-clipPath-and-object-creation-expected.txt
[add] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/LayoutTests/platform/linux/virtual/spv175/paint/invalidation/svg/js-late-clipPath-creation-expected.txt
[add] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/LayoutTests/platform/linux/virtual/spv175/paint/invalidation/svg/mask-clip-target-transform-expected.txt
[add] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/LayoutTests/platform/linux/virtual/spv175/paint/invalidation/svg/resource-invalidate-on-target-update-expected.txt
[modify] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/LayoutTests/platform/mac/svg/zoom/page/zoom-clip-path-expected.txt
[modify] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/LayoutTests/platform/win/svg/zoom/page/zoom-clip-path-expected.txt
[modify] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/LayoutTests/svg/clip-path/clip-path-on-svg-and-child-expected.txt
[modify] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/LayoutTests/svg/clip-path/clip-path-on-svg-expected.txt
[modify] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/Source/core/layout/LayoutObject.cpp
[modify] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/Source/core/layout/LayoutObject.h
[modify] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceContainer.cpp
[modify] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/Source/core/paint/ClipPathClipper.cpp
[modify] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/Source/core/paint/FindPropertiesNeedingUpdate.h
[modify] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/Source/core/paint/FragmentData.cpp
[modify] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/Source/core/paint/FragmentData.h
[modify] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/Source/core/paint/ObjectPaintProperties.h
[modify] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
[modify] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/Source/core/paint/PaintLayerResourceInfo.cpp
[modify] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
[modify] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/Source/core/paint/SVGPaintContext.cpp
[modify] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/Source/platform/graphics/CompositorElementId.cpp
[modify] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/Source/platform/graphics/CompositorElementId.h
[modify] https://crrev.com/763f7c9cd7f480cd785a897050b6a1c36d872f18/third_party/WebKit/Source/platform/graphics/Path.h

Status: Fixed (was: Started)

Sign in to add a comment