[whatwg] [canvas] request for {create, get, put}ImageDataHD and ctx.backingStorePixelRatio

Charles Pritchard wrote:

>> But now run through this logic when the <canvas> is making a high res
>> backing store automatically: by doing the clever thing, you're now
>> quadrupling the size of the canvas, and you're paying an exorbitant
>> storage cost for doing so.
>
> Which (a): never happens

Sorry, what never happens? Developers commonly double the size of their
<canvas>es (and scale them down with CSS) to support both the iPhone 3GS
and iPhone 4. Which means such code would use 4 times as much memory as
intended when <canvas> uses such a backing store.

> and (b) can be detected via 1x1 pixel canvas.

Having to round-trip image data through a <canvas> in order to detect
its backing store size is one of the problems I'm trying to solve here.

>> You really only want to do the "make it twice as big and then scale
>> it down with CSS" trick when backing store pixels are 1:1 to CSS
>> pixels.
>
> I do "tricks" to support browser zoom. They are increments; .5,.7,
> 1.1, 1.2, 1.3, etc.

Huh? I'm not sure what you mean by "browser zoom," nor do I know what it
has to do with my proposed additions to the <canvas> 2D Context API.


Ted

Received on Tuesday, 20 March 2012 15:05:49 UTC