Could this be an opportunity to design an asynchronous API for fetching the pixel buffer? It seems like many implementations are GPU backed now, and fetching the pixel buffer is an expensive (blocking) operation. Had you considered making such a change?<div>
<br></div><div>Regards,</div><div>-Darin</div><div><br></div><div><br><br><div class="gmail_quote">On Thu, Apr 12, 2012 at 6:17 PM, Dan Bernstein <span dir="ltr"><<a href="mailto:mitz@apple.com">mitz@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">[This is actually an enhancement announcement to an existing feature]<br>
<br>
Over at <<a href="http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-March/035112.html" target="_blank">http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-March/035112.html</a>>, 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.<br>
<br>
Through <<a href="https://bugs.webkit.org/show_bug.cgi?id=83619" target="_blank">https://bugs.webkit.org/show_bug.cgi?id=83619</a>> and <<a href="https://bugs.webkit.org/show_bug.cgi?id=83836" target="_blank">https://bugs.webkit.org/show_bug.cgi?id=83836</a>>, I am making these enhancements, with the names prefixed with “webkit”.<br>
<br>
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.<br>
_______________________________________________<br>
webkit-dev mailing list<br>
<a href="mailto:webkit-dev@lists.webkit.org">webkit-dev@lists.webkit.org</a><br>
<a href="http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev" target="_blank">http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev</a><br>
</blockquote></div><br></div>