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

On Wed, Dec 19, 2012 at 1:29 AM, Robert O'Callahan <robert@ocallahan.org>wrote:

> On Wed, Dec 19, 2012 at 5:39 PM, Rik Cabanier <cabanier@gmail.com> wrote:
>
>> On Tue, Dec 18, 2012 at 1:14 PM, Robert O'Callahan <robert@ocallahan.org>wrote:
>>
>>> 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?
>>
>
> Yes. That's what I said.
>
>
>> 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
>>
>
> You mean, how is using createImageBitmap better than drawing the input
> ImageBitmap into a temporary canvas and then using that canvas instead of
> the result of createImageBitmap?
>
> Basically, createImageBitmap is a more direct approach that's easier to
> optimize to avoid copying the image data.


Would it also handled HD backing stores automatically, like drawImage does?

Received on Wednesday, 19 December 2012 18:33:34 UTC