Re: [whatwg] I believe source rectangles for HTML5 Canvas drawImage are specified incorrectly

On Tue, Dec 18, 2012 at 1:14 PM, Robert O'Callahan <robert@ocallahan.org>wrote:

> On Wed, Dec 19, 2012 at 4:17 AM, Kevin Gadd <kevin.gadd@gmail.com> wrote:
>
>> Sorry, upon reading over the ImageBitmap part of the spec again I'm
>> confused: Why is constructing an ImageBitmap asynchronous? I thought
>> any decoding isn't supposed to happen until drawImage, so I don't
>> really understand why this operation involves a callback and a delay.
>> Making ImageBitmap creation async means that you *cannot* use this as
>> a replacement for drawImage source rectangles unless you know all
>> possible source rectangles in advance. This is not possible for many,
>> many use cases (scrolling through a bitmap would be one trivial
>> example).
>>
>
> I think this is a real problem.
>
> It seems to me a synchronous constructor that creates an ImageBitmap for a
> subimage of another ImageBitmap (but not other kind of source!) will be
> needed.
>
>
Did you mean to say a synchronous constructor?
Reading the new spec (
http://www.whatwg.org/specs/web-apps/current-work/#imagebitmap), I still
fail to see how this is better than a drawimage with dx=dy=0 and
dw/dy=canvas width/height

Received on Wednesday, 19 December 2012 04:39:38 UTC