Ignore:
Timestamp:
Jan 5, 2009, 3:57:09 PM (16 years ago)
Author:
[email protected]
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/JavaScriptCore.scons

    r39487 r39625  
    5050    'runtime/BooleanObject.cpp',
    5151    'runtime/BooleanPrototype.cpp',
     52    'runtime/ByteArray.cpp',
    5253    'runtime/CallData.cpp',
    5354    'runtime/Collector.cpp',
     
    7374    'runtime/JSActivation.cpp',
    7475    'runtime/JSArray.cpp',
     76    'runtime/JSByteArray.cpp',
    7577    'runtime/JSCell.cpp',
    7678    'runtime/JSFunction.cpp',
Note: See TracChangeset for help on using the changeset viewer.