W3C home > Mailing lists > Public > whatwg@whatwg.org > December 2009

[whatwg] "offscreen canvas" /Access to canvas functionality from a worker

From: Robert O'Callahan <robert@ocallahan.org>
Date: Fri, 11 Dec 2009 10:29:37 -0800
Message-ID: <11e306600912111029m2a13c11dnbd3311a168e233f3@mail.gmail.com>
On Fri, Dec 11, 2009 at 2:30 AM, Jeremy Orlow <jorlow at chromium.org> wrote:

> CanvasRenderingContext2Ds would never need to be shared between threads
> because they're "cloned" when passed...so is your concern that the libraries
> are only meant to ever be used from one thread?  Maybe I'm being naive, but
> it would surprise me if that turned out to be an issue.

In Gecko we build cairo configured to only be usable from one thread. This
reduces locking overhead around global caches. We could change that
decision, but that would impose a small penalty on normal rendering, so it's
a trade-off.

Resizing images was just one use.  I could easily imagine apps wanting to
> generate more complex images on background threads without needing to
> implement things like spline drawing, pattern filling, and text themselves.

Drawing text on a worker thread means making CSS font parsing, associated
font objects, text shaping, and bidi processing all usable from multiple
threads. That would be a much bigger problem for us than the actual

"He was pierced for our transgressions, he was crushed for our iniquities;
the punishment that brought us peace was upon him, and by his wounds we are
healed. We all, like sheep, have gone astray, each of us has turned to his
own way; and the LORD has laid on him the iniquity of us all." [Isaiah
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20091211/1101ad90/attachment.htm>
Received on Friday, 11 December 2009 10:29:37 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:54 UTC