Comment #11 on issue 131581 by
tha...@chromium.org: WebGL pixel doubled
http://code.google.com/p/chromium/issues/detail?id=131581
rbyers: WebGL Aquarium
jamesr, gman (and rest): For Canvas2D, apple suggest the following logic to
decide if manual pixel doubling through CSS should be done:
// To create a 400x300 canvas:
if ( window.devicePixelRatio ) {
// LoDPI display, set canvas size to 400x300
} else {
var context = myCanvas.getContext("2d");
if (context.webkitBackingStorePixelRatio == 1) {
// currently the case on iOS. Set canvas size to 800x600 to get 800x600
// pixels, then size it to 400x300 via css. (XXX)
} else {
// current mac hidpi path. Create canvas in 400x300,
// it's transparently created with 800x600 pixels instead
}
}
It's conceivable they want to move iOS to the mac model too. I don't know
if something like that is feasible for webgl.
rbyers: For WebGL, pages currently have to do the path marked with (XXX).
(I think this bug is WontFix; maybe you want to repurpose it for discussing
if the canvas2d if webkitBackingStorePixelRatio trick could work here.
Probably not, as OpenGL is kind of pixel based.)