Re: [css-compositing] Request to move Compositing and Blending spec to CR

On Wed, Dec 11, 2013 at 6:57 PM, James Robinson <> wrote:

> On Wed, Dec 11, 2013 at 6:44 PM, Rik Cabanier <> wrote:
>>> Canvas is defined in HTML.  Having text here to define a behavior that
>>> canvas does not use is just confusing with no upside.
>> No, canvas refers to the compositing spec for the 'globalComposite'
>> operator [1]:
>> The globalCompositeOperation attribute sets the current composition
>> operator, which controls how shapes and images are drawn onto the scratch
>> bitmap<>,
>> once they have had globalAlpha<> and
>> the current transformation matrix applied. The possible values are those
>> defined in the Compositing and Blending specification. [COMPOSITE]<>
>> Do you think the canvas spec should be more clear that compositing is
>> defined in the "Compositing and Blending specification"?
> The paragraph in question -  "9.2.3. Clip to self behavior" - describes a
> behavior that is not used by canvas, or (from what you've said) by anything
> in the Compositing and Blending spec.  What value does it have other than
> creating confusion, in that case?

Section 5-10 define a generic model for blending and compositing.
The normative section defines a subsection of that model. Hopefully we can
implement the whole model over the coming years.
By defining it this way, it should be more clear to an implementor how
things are supposed to be work.
For example, the problems that you mentioned earlier:

Firefox applied the compositing operation to the entire canvas, respecting
the current clip, and WebKit applied the compositing operation only to the
"bounds" of the draw.

 would not have happened if there had been a definition like you find in
the current spec:

I don't really see a way to define how compositing works in canvas without
describing the clip-to-self behavior somehow...

Received on Thursday, 12 December 2013 03:17:13 UTC