[webkit-dev] Adding blending mode to WebKit canvas

Maciej Stachowiak mjs at apple.com
Wed Nov 14 17:55:10 PST 2012

On Nov 14, 2012, at 5:19 PM, Rik Cabanier <cabanier at gmail.com> wrote:

> I send the question to the fx list.
> Tab Atkins brought up that we could extend the 'globalCompositeOperator' so it also takes a comma separate list of a blend and a compositing operation.
> Calling:
> mycontext.globalCompositeOperator = 'multiply';
> would be identical to:
> mycontext.globalCompositeOperator = 'multiply, source-over';
> This would make Canvas support blending and compositing and can be implemented with no compatibility issues later.
> Does this ease your concern about the difference between Canvas and CSS?

That still seems inconsistent between canvas and CSS to me. CSS will have two completely separate properties, not one that takes a comma-separated list, right? Why is one attribute with a comma-separated list superior for canvas but two properties are superior for CSS?

Other concerns:
- Taking a comma-separated list misleadingly implies that it can have an arbitrary number of components in arbitrary order, which is not the case.
- Compared to having a separate property, this makes it hard to feature-test whether blend modes are supported.

I can join the fx list to discuss this directly if you think that would help.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20121114/c5afbdd7/attachment.html>

More information about the webkit-dev mailing list