W3C home > Mailing lists > Public > public-canvas-api@w3.org > October to December 2010

RE: Inconsistent behaviour of globalCompositeOperation property

From: Jatinder Mann <jmann@microsoft.com>
Date: Wed, 15 Dec 2010 23:45:39 +0000
To: "public-canvas-api@w3.org" <public-canvas-api@w3.org>
Message-ID: <EAACC9DF6817544486F0D0ADA05CA428220044AD@TK5EX14MBXC111.redmond.corp.microsoft.com>
We initially felt that the Drawing Model [1], as written in the spec, was incorrectly defined. We have since consulted with many graphics experts, and it appears that the spec as written, and implemented by Firefox and Opera, is the correct definition of Porter-Duff and composition operations, and its behavior is acceptable.

Thanks,
Jatinder


[1] http://dev.w3.org/html5/2dcontext/#drawing-model


Jatinder Mann | Microsoft Program Manager | jmann@microsoft.com<mailto:jmann@microsoft.com>

From: public-canvas-api-request@w3.org [mailto:public-canvas-api-request@w3.org] On Behalf Of Jatinder Mann
Sent: Tuesday, May 25, 2010 11:57 AM
To: public-canvas-api@w3.org
Subject: Inconsistent behaviour of globalCompositeOperation property


As we were reviewing the globalCompositeOperation property [1] of the Canvas 2D Context, we have noticed that there is a large inconsistency with the way web browsers implement this property.



Firefox 3.6.3 and Opera 10.5 have a similar behaviour that matches the current version of the Canvas 2D Context spec. Chrome 4.1 and Safari 4.0.5 behave similarly to each other, albeit differently from the spec. Today, web developers cannot reliably use this property in designing their webpages due to this interoperability issue.



We consider that the Safari implementation of the Drawing Model makes more sense from a web developer point of view. Most of the Canvas APIs are applied to the next primitive being drawn. However, the clipping behavior, as defined in the current Drawing Model [2], affects the current contents of the Canvas outside of the current primitive being drawn. The Safari Drawing Model calls for the clipping region to only affect the current primitive being drawn.



We recommend updating the spec to match the Safari Drawing Model. We would like to discuss this area in more detail.



Thank you,

Jatinder



[1] http://dev.w3.org/html5/2dcontext/#compositing

[2] http://dev.w3.org/html5/2dcontext/#drawing-model



Jatinder Mann | Microsoft Program Manager | jmann@microsoft.com<mailto:jmann@microsoft.com>
Received on Wednesday, 15 December 2010 23:46:16 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 15 December 2010 23:46:24 GMT