[whatwg] Canvas in workers

Glenn Maynard glenn at zewt.org
Thu Oct 24 06:59:08 PDT 2013


>
> ----- Original Message -----
> From: "Robert O'Callahan" <robert at ocallahan.org>
>
> We talked through this proposal with a lot of Mozilla people in a meeting
> and collectively decided that we don't care about the case of workers that
> commit multiple frames to a canvas without yielding --- at least for now.
> So we want to remove commit() and copy the main-thread semantics that a
> canvas frame is eligible for presentation whenever script is not running in
> the worker.
>

On Thu, Oct 24, 2013 at 7:25 AM, Jeff Gilbert <jgilbert at mozilla.com> wrote:

> This is not the current WebGL semantics:
>     WebGL presents its drawing buffer to the HTML page compositor
> immediately before a compositing operation[...]
>

(Can you please quote correctly?  Having one person top-quoting makes a
mess of the whole thread, and it looked like you were saying that the WebGL
spec language you were quoting was incorrect.)

The assumption WebGL is making here is that compositing is a synchronous
task in the event loop, which happens while no script is running.  That is,
the semantics Robert describes are the same as what the WebGL spec is
trying to say.  That's not necessarily how compositing actually works,
though, and that language also won't make sense with threaded rendering.
It might be better for WebGL to define this using the "global script
clean-up jobs" task that HTML now defines.
http://www.whatwg.org/specs/web-apps/current-work/#run-the-global-script-clean-up-jobs
I'd recommend spinning off a separate thread if we want to go into this
further.

-- 
Glenn Maynard



More information about the whatwg mailing list