On Thu, Jun 25, 2015 at 4:57 PM, Boris Zbarsky <bzbar...@mit.edu> wrote:

> On 6/24/15 1:28 PM, Ashley Gullen wrote:
>>  Note for devices with discrete GPUs, it's possible that ImageBitmap
>> stores the decompressed image data in a GPU texture but does not have it
>> in system RAM.
> Indeed.  This is another situation where going directly from an
> HTMLImageElement to an ImageData or Blob would make some sense, because it
> would allow the UA to avoid the GPU upload and readback, right?
> I'm not convinced the spec should worry about GPU uploads and readbacks.
I think the term "undue latency" is conveniently vague, which gives
implementers an interesting level of freedom to use smart heuristics and
make  implementation-specific or platform-specific or decisions. For
example, I would argue that on many platforms uploading an image to the GPU
probably does not constitute undue latency, but a readback probably does.
Under those assumptions, an implementation may decide that ImageBitmaps
should be lazily uploaded to the GPU the first time they're drawn. That way
the GPU can be short-circuited when appropriate. Also, the spec requires
that ImageBitmaps be *drawn* without undue latency, it does not require
that converting to a Blob or an ImageData be lightning fast.  Anyways, my
point is that implementers have enough wiggle room to do the right thing
even without direct methods on <img>.

> -Boris

Reply via email to