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

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

From: Robert O'Callahan <robert@ocallahan.org>
Date: Wed, 19 Dec 2012 10:14:40 +1300
Message-ID: <CAOp6jLbfxXORXa7VdPTkE69fu4CfDUR+XGOBGrTB_EgB5VAUmg@mail.gmail.com>
To: Kevin Gadd <kevin.gadd@gmail.com>
Cc: Vladimir Vukicevic <vladimir@pobox.com>, Rik Cabanier <cabanier@gmail.com>, Justin Novosad <junov@chromium.org>, whatwg@lists.whatwg.org, Jeff Muizelaar <jmuizelaar@mozilla.com>, Ian Hickson <ian@hixie.ch>
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

Jesus called them together and said, “You know that the rulers of the
Gentiles lord it over them, and their high officials exercise authority
over them. Not so with you. Instead, whoever wants to become great among
you must be your servant, and whoever wants to be first must be your
slave — just
as the Son of Man did not come to be served, but to serve, and to give his
life as a ransom for many.” [Matthew 20:25-28]
Received on Tuesday, 18 December 2012 21:15:05 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:50 UTC