[whatwg] <canvas> and high-density displays
Ian Hickson
ian at hixie.ch
Fri Nov 23 14:14:15 PST 2012
On Mon, 24 Sep 2012, Glenn Maynard wrote:
> On Mon, Sep 24, 2012 at 6:40 PM, Ian Hickson <ian at hixie.ch> wrote:
> >
> > We could add an event that fires on ImageData (or even ArrayBuffer)
> > that fires when the data is available. If we add it to ArrayBuffer
> > it's something that could be used in other contexts, too.
> >
> > Is this something that people think we should do? If so, should we add
> > it to TypedArray generically?
>
> If it's done this way, a nonblocking function may be needed to request
> that the event be fired, without the blocking side-effects of actually
> performing a pixel read. Otherwise, implementations that don't perform
> the readback at all until it knows it's really needed (eg. that it can't
> be done with an in-GPU blit) would simply never fire the event at all.
> Passing in a callback probably makes more sense this way than having it
> request that an event be fired.
>
> That would also allow waiting for readability without knowing in advance
> whether the event was already fired or not, which would be important eg.
> if you just received the ArrayBuffer in a message. (An attribute could
> do this as well, but that might be more prone to developer error.)
Indeed.
If this is something that people want to follow up on, I recommend
suggesting it to the WebGL mailing list where Typed Array lives. I don't
think it makes sense for us to do a version just for canvas.
--
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg
mailing list