New issue
Advanced search Search tips

Issue 659853 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

cc::FilterOperation needs to support percentage unit

Project Member Reported by trchen@chromium.org, Oct 27 2016

Issue description

This is needed to correctly animate filtered elements.

CSS filter property allows to use an external URL to load a complex SVG filter. In that syntax, the filter as a whole can specify a "filter region"(#1) as a hard clip to the input image, and each filter primitive can specify a "filter primitive subregion"(#1) as a hard clip to the output of the filter step.

Both filter region and filter primitive subregion can use percentage unit. For filter primitive subregion, percentage is relative to filter region.
For filter region, percentage is relative to the visual overflow of the subtree by default(#2, #3).

Currently our implementation only computes the visual overflow during paint (see PaintLayer::boxForFilter()), but it should be mutated by threaded animation.

[#1] https://drafts.fxtf.org/filters/#FilterPrimitiveSubRegion
[#2] https://drafts.fxtf.org/filters/#filter-region
[#3] https://www.w3.org/TR/2011/REC-SVG11-20110816/coords.html#ObjectBoundingBoxUnits
 
I think this (non-landed) change may be relevant: https://codereview.chromium.org/2232013002/

The solution implemented there was simply to prevent threaded animations of filters with reference filters, and to recompute the reference box on the main thread when the child transform changes.

I wasn't too happy with this approach, but it feels like preserving the filter region as percentage units all the way down into cc (and Skia?) was a lot of work for a niche case.

Comment 2 by trchen@chromium.org, Oct 27 2016

Ah totally relevant! That (non-landed) change needs to have a SPv2 counterpart. That said, I agree this isn't a very common use case to prioritize for.

Comment 3 by suzyh@chromium.org, Apr 5 2017

Components: -Blink>CSS>Filters Blink>Compositing>Filters
Project Member

Comment 4 by sheriffbot@chromium.org, Apr 11 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Available (was: Untriaged)

Sign in to add a comment