W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2012

[whatwg] [canvas] request for {create, get, put}ImageDataHD and ctx.backingStorePixelRatio

From: Glenn Maynard <glenn@zewt.org>
Date: Mon, 23 Apr 2012 20:50:56 -0500
Message-ID: <CABirCh-=DgnikEBaicc9pYsQrY0cZM9T_Z+wFx2vqcPx-qd4=A@mail.gmail.com>
On Mon, Apr 23, 2012 at 12:43 PM, Darin Fisher <darin at chromium.org> wrote:

> That said, I've come around to being OK with getImageDataHD.  As I wrote
> recently, this is because it is possible to implement that in a
> non-blocking fashion.  It can just queue up a readback.  It only becomes
> necessary to block the calling thread when a pixel is dereferenced.  This
> affords developers with an opportunity to instead pass the ImageData off to
> a web worker before dereferencing.  Hence, the main thread should not jank
> up.  This of course requires developers to be very smart about what they
> are doing, and for browsers to be smart too.
>

It's reasonable to expect users to use async APIs in the main thread;
that's just a part of the platform.  It's not reasonable to expect people
to fire up a worker and transfer the buffer to the worker to prevent the
blocking from happening in the main thread.  That's a particularly hackish
workaround, not a replacement for an async API.

-- 
Glenn Maynard
Received on Monday, 23 April 2012 18:50:56 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:07 GMT