W3C home > Mailing lists > Public > public-fx@w3.org > January to March 2013

Re: Stacking context and offscreen bitmaps

From: James Robinson <jamesr@google.com>
Date: Thu, 7 Mar 2013 13:21:35 -0800
Message-ID: <CAD73md+6x6NuzB7y3oB6g7r8YnGPh9yYmWboSPpNLWQf6VEOKA@mail.gmail.com>
To: Rik Cabanier <cabanier@gmail.com>
Cc: public-fx@w3.org
On Thu, Mar 7, 2013 at 1:05 PM, Rik Cabanier <cabanier@gmail.com> wrote:

> In order to have interoperable implementations of blending and filters,
> there needs to be a specification that describes when offscreen bitmaps are
> generated.


No.  Specifications should be written in terms of observable behaviors, not
in terms of implementation details.  It's fine to specify the desired
rendering in such a way that using an offscreen bitmap is convenient to
use, but whether or not an implementation uses offscreen bitmaps or not is
not part of the spec.


> Currently, the compositing spec states that every stacking context will
> have a buffer [1] but that is not always the case [2]. This behavior is not
> documented.
>

> I can see 2 ways forward:
> 1. document the current browser behavior
> Create a new document, or extend "Appendix E. Elaborate description of
> Stacking Contexts" [3] so it describes when off-screen buffers should be
> generated.
> Browsers wouldn't have to change their behavior if they didn't follow the
> spec except where it would make a difference.
>

That's why it is important to define the rendering you want to achieve, not
the method in which that rendering is achieved.


> For instance, if a browser did not create a buffer for a stacking context
> but the spec said it should and there is blending or a filter that accesses
> the backdrop, then the stacking context should create a buffer.
> I think this would be fairly easy to implement but it would take quite a
> bit of time to investigate and document. A drawback is that the spec would
> be complex and hard to use for authors
>
> 2. Always give a stacking context on offscreen buffer if it contains an
> element with blending.
> This would be a bit harder to implement, but easy to specify.
>

What does "an element with blending" mean?  These things would be very
expensive, whatever they are.

- James


> The biggest drawback is that it introduces more isolated groups. For
> instance, 2d transform or 'position: abs' won't force isolation currently.
>
> Rik
>
>
> 1:
> https://dvcs.w3.org/hg/FXTF/rawfile/default/compositing/index.html#csscompositingrules_CSS
> 2: http://lists.w3.org/Archives/Public/public-fx/2013JanMar/0109.html
> 3: http://www.w3.org/TR/CSS21/zindex.html
>
Received on Thursday, 7 March 2013 21:22:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 7 March 2013 21:22:04 GMT