- From: Justin Novosad <junov@chromium.org>
- Date: Mon, 17 Dec 2012 14:49:33 -0500
- To: Rik Cabanier <cabanier@gmail.com>
- Cc: whatwg@lists.whatwg.org, Jeff Muizelaar <jmuizelaar@mozilla.com>, Vladimir Vukicevic <vladimir@pobox.com>, Ian Hickson <ian@hixie.ch>, Kevin Gadd <kevin.gadd@gmail.com>
> Isn't this the same as what Ian suggested: copy it to a temporary canvas > and use the temporary canvas scales. > It seems that you can optimize that case too. > Hmm... It would one of those optimizations that only works if you perform the secret handshake just right. If I understand correctly, the hypothetical optimization would work something like this: When a 2d canvas context is created, do not allocate a backing store immediately. If the first draw operation into the canvas is a drawImage from an image element and covers the entire canvas, then use a shallow copy of the bitmap as the backing store. If anything else is drawn into the canvas, then a proper backing store should be allocated and used. I guess it could work... but I would fear that this behavior would be perceived as idiosyncratic.
Received on Monday, 17 December 2012 19:50:01 UTC