[webkit-dev] Feature announcement: canvas pixel access API additions for high-resolution backing stores

Dan Bernstein mitz at apple.com
Thu Apr 12 18:17:58 PDT 2012

[This is actually an enhancement announcement to an existing feature]

Over at <http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-March/035112.html>, Edward O’Connor has proposed enhancements to CanvasRenderingContext2D to allow authors to take full advantage of high-resolution backing stores, when available (whereas the existing API hides the fact that the backing store resolution is not CSS pixel resolution, for compatibility with existing content). The enhancements include a backingStorePixelRatio attribute and {get,put}ImageDataHD functions on CanvasRenderingContext2D.

Through <https://bugs.webkit.org/show_bug.cgi?id=83619> and <https://bugs.webkit.org/show_bug.cgi?id=83836>, I am making these enhancements, with the names prefixed with “webkit”.

There is no build-time option to disable these enhancements. Ports that don’t opt into ENABLE_HIGH_DPI_CANVAS get a working, albeit boring, version of the additional API. Ports that opt into high-DPI canvas need to enhance their ImageBuffer implementation to fully support the resolutionScale and CoordinateSystem parameters.

More information about the webkit-dev mailing list