Intent to Ship: Filters in 2D Canvas

69 views
Skip to first unread message

Ali Juma

unread,
Apr 6, 2016, 3:57:14 PM4/6/16
to blink-dev, ju...@chromium.org

Contact emails

aj...@chromium.org, ju...@chromium.org


Spec

https://html.spec.whatwg.org/multipage/scripting.html#filters


Summary

A string attribute 'filter' on CanvasRenderingContext2D to apply effects to primitives drawn to the canvas. The attribute is parsed the same way as CSS filters.


Link to “Intent to Implement” blink-dev discussion

https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/hx5g-yHS45I


Is this feature supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes


Debuggability

No special debugging support is needed.


Interoperability and Compatibility Risk

Firefox has implemented this feature behind a flag. There are no public signals from Internet Explorer or Safari.


Compatibility risk is low. This is a new API, so doesn’t affect web content that doesn’t use it.


OWP launch tracking bug

https://crbug.com/501642


Entry on the feature dashboard

https://www.chromestatus.com/features/6701649301078016

Chris Harrelson

unread,
Apr 6, 2016, 5:22:52 PM4/6/16
to Ali Juma, blink-dev, ju...@chromium.org
LGTM to ship in M52, to give the spec time for late-breaking feedback. But I am recusing myself since it's a person on my team who is shipping. :)


--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Rick Byers

unread,
Apr 6, 2016, 7:36:08 PM4/6/16
to Chris Harrelson, Ali Juma, blink-dev, Justin Novosad
Since we're the first to ship (behind a flag doesn't count), I feel compelled to apply a little extra rigor and ask: what's the status of the Mozilla implementation?  Are they happy with the state of the spec?  Has anyone attempted to test the interoperability between the blink and Gecko implementations?

Ali Juma

unread,
Apr 8, 2016, 4:41:36 PM4/8/16
to Rick Byers, Chris Harrelson, blink-dev, Justin Novosad
On Wed, Apr 6, 2016 at 7:36 PM Rick Byers <rby...@chromium.org> wrote:
Since we're the first to ship (behind a flag doesn't count), I feel compelled to apply a little extra rigor and ask: what's the status of the Mozilla implementation? Are they happy with the state of the spec?  Has anyone attempted to test the interoperability between the blink and Gecko implementations?

Mozilla has a few bugs left to fix before enabling the feature (tracked in [1]). They seem to be happy with the spec (e.g., see mstange's comment [2]), and indeed the spec wording is mostly derived from Mozilla's original proposal [3]. In my testing of the two implementations, I found one significant difference [4] which I'll make sure gets fixed before we ship.

Rick Byers

unread,
Apr 8, 2016, 4:47:33 PM4/8/16
to Ali Juma, Chris Harrelson, blink-dev, Justin Novosad
Thanks LGTM1 to ship.

Please just let the Mozilla folks working on this know that we're planning on shipping now and they should speak up here if they have any concerns.

PhistucK

unread,
Apr 8, 2016, 4:58:12 PM4/8/16
to Rick Byers, Ali Juma, Chris Harrelson, blink-dev, Justin Novosad
​While not entirely related, it feels a bit awkward to have an officially supported API for canvas filters while CSS ​filters (which use the same syntax and give a similar effect, only on all of the elements) are still unofficially supported (prefixed). Is shipping unprefixed CSS filters on the short term table?

And perhaps related - are there CSS filter issues that prevent Blink from unprefixing that also affect canvas filters?


PhistucK

Stephen White

unread,
Apr 11, 2016, 2:49:40 PM4/11/16
to PhistucK, Rick Byers, Ali Juma, Chris Harrelson, blink-dev, Justin Novosad
On Fri, Apr 8, 2016 at 4:57 PM, PhistucK <phis...@gmail.com> wrote:
​While not entirely related, it feels a bit awkward to have an officially supported API for canvas filters while CSS ​filters (which use the same syntax and give a similar effect, only on all of the elements) are still unofficially supported (prefixed). Is shipping unprefixed CSS filters on the short term table?

Unfortunately, since the CSS "filter" property is already in use by SVG filters (on SVG elements), unprefixing "-webkit-filter" is blocked on switching the legacy SVG filters implementation over to using the (HTML) Filter Effects implementation, which sadly is not as simple as it sounds. See https://bugs.chromium.org/p/chromium/issues/detail?id=244295 for some details.
 
And perhaps related - are there CSS filter issues that prevent Blink from unprefixing that also affect canvas filters?

AFAIK, no. This should not affect canvas filters.

Stephen

TAMURA, Kent

unread,
Apr 12, 2016, 1:39:44 AM4/12/16
to Rick Byers, Ali Juma, Chris Harrelson, blink-dev, Justin Novosad
LGTM3.

--
TAMURA Kent
Software Engineer, Google


Ali Juma

unread,
Apr 12, 2016, 9:07:30 AM4/12/16
to TAMURA, Kent, Rick Byers, Chris Harrelson, blink-dev, Justin Novosad
On Tue, Apr 12, 2016 at 1:39 AM TAMURA, Kent <tk...@chromium.org> wrote:
LGTM3.

Thanks. This still needs one more lgtm (not counting chrishtr's lgtm since he also recused himself).

Dimitri Glazkov

unread,
Apr 12, 2016, 10:05:16 AM4/12/16
to Ali Juma, TAMURA, Kent, Rick Byers, Chris Harrelson, blink-dev, Justin Novosad
LGTM4.

:DG<
Reply all
Reply to author
Forward
0 new messages