CanvasPixelArray performance is too slow
<https://bugs.webkit.org/show_bug.cgi?id=23123>
Reviewed by Gavin Barraclough
JavaScriptCore:
The fix to this is to devirtualise get and put in a manner similar to
JSString and JSArray. To do this I've added a ByteArray implementation
and JSByteArray wrapper to JSC. We can then do vptr comparisons to
devirtualise the calls.
This devirtualisation improves performance by 1.5-2x in my somewhat ad
hoc tests.
WebCore:
Remove the WebCore CanvasPixelArray implementation and replace
CPA usage with JSC::ByteArray. Replace the JSCanvasPixelArray
wrapper with an explicitly instantiated JSByteArray put on the
JSImageData object as an ordinary ReadOnly, DontDelete property.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39625 268f45cc-cd09-0410-ab3c-d52691b4dbfc
33 files changed