Reviewers: chrishtr, ajuma (slow till Oct 24), pdr.
CL:
https://chromiumcodereview.appspot.com/2428513004/Message:
This is a WIP for SPv2 filter implementation. Right now I'm still blocked by a
DCHECK in PaintLayerClipper / GeometryMapper. Uploaded for early preview.
To ajuma:
How the generated effect node would interact with clip tree will be slightly
different from SPv1.
Previously the effect's output clip must be a common ancestor of all compositing
children (child effects, layers painting into this effect)'s clip, and when the
compositing children draw into the surface, only clips below the output clip
will be applied.
In this CL, children of a filter will be explicitly unclipped (i.e. their clip
node parented to root). This should bring back some sanity.
To chrishtr:
The filter & clip interaction was inconsistent between composited and
non-composited path. For composited path, only the filter output is clipped,
while the inputs skip all accumulated clip. For non-composited path, both output
and inputs are clipped. This is probably a bug due to not expanding Skia layer
bound when spatial filter (e.g. blur) exists. This CL follows the composited
behavior, which IMO makes more sense when interacts with scrolling.
This clip escaping behavior triggered a DCHECK in GeometryMapper.
Another thing I noticed is that currently GeometryMapper doesn't distinguish
between cull rect and clip rect computation.
Although computation is similar, I think they are very different concept and
needs to be explicitly spelled out in code.
Cull rect allows false positive, and should take animation & filter expanding
into account.
One the other hand, clip rect should be exact rect. If a clip chain contains
rect that are not axis aligned to target space, or contains rounded rect, those
should be DCHECK'd or reported to caller by a flag.
For SPv2 only the cull rect is useful in Blink, while clip rect may be useful in
CC. For SPv1 only the clip rect is used.
Description:
WIP WIP WIP WIP WIP WIP WIP WIP WIP WIP WIP WIP WIP WIP WIP WIP WIP WIP WIP WIP
[SPv2] Create effect nodes for CSS filter
This CL does the following two things:
* Add filter related properties to EffectPaintPropertyNode
* Add CSS effect support to PaintPropertyTreeBuilder
What's not in the scope of this CL:
* Compile filter property from Blink effect node to CC effect node
BUG=609937
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Affected files (+209, -38 lines):
M third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
M third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp
M third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp
M third_party/WebKit/Source/platform/graphics/paint/EffectPaintPropertyNode.h
M third_party/WebKit/Source/platform/graphics/paint/GeometryMapperTest.cpp
M third_party/WebKit/Source/platform/graphics/paint/PaintArtifactToSkCanvasTest.cpp
M third_party/WebKit/Source/platform/graphics/paint/PaintChunkerTest.cpp
M third_party/WebKit/Source/platform/graphics/paint/PaintControllerTest.cpp