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

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

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

> 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
> drawing...
>

Good point.  Maybe that could be in a future version if it proved itself
useful.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20091211/df3e4c1e/attachment-0001.htm>
Received on Friday, 11 December 2009 11:02:54 UTC

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