W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2010

[whatwg] Canvas: clarification of compositing operations needed

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 28 Jul 2010 14:46:52 -0700
Message-ID: <AANLkTinsP92pBGd8JNTp4=5WDtSvU-pab=waGfWKGPNg@mail.gmail.com>
On Wed, Jul 28, 2010 at 2:43 PM, David Flanagan <david at davidflanagan.com> wrote:
> Firefox and Chrome disagree about the implementation of the
> destination-atop, source-in, destination-in, and source-out compositing
> operators. ?Test code is attached.
>
> Chrome doesn't touch any destination pixels that are not underneath the
> source pixels. ?Firefox, on the other hand, treats the entire canvas (inside
> the clipping region) as the destination and if you use the destination-in
> operator, for example, will erase any pixels outside of whatever you are
> drawing.
>
> I suspect, based on the reference to an "infinite transparent black bitmap"
> in 4.8.11.1.13 Drawing model that Firefox gets this right and Chrome gets it
> wrong, but it would be nice to have that confirmed.
>
> I suggest clarifying 4.8.11.1.3 Compositing to mention that the compositing
> operation takes place on all pixels within the clipping region, and that
> some compositing operators clear large portions of the canvas.

The spec is completely clear on this matter - Firefox is right,
Chrome/Safari are wrong.  They do it wrongly because that's how
CoreGraphics, their graphics library, does things natively.

~TJ
Received on Wednesday, 28 July 2010 14:46:52 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:25 UTC