Changeset 104324 in webkit


Ignore:
Timestamp:
Jan 6, 2012 12:38:42 PM (12 years ago)
Author:
oliver@apple.com
Message:

DFG no longer optimises CanvasPixelArray
https://bugs.webkit.org/show_bug.cgi?id=75729

Reviewed by Gavin Barraclough.

Source/JavaScriptCore:

Rename ByteArray (in its ClassInfo) to Uint8ClampedArray to match
the future name when we switch over to the new typed-array based
ImageData specification.

  • runtime/JSByteArray.cpp:

Source/WebCore:

Remove the custom ClassInfo for CanvasPixelArray as that is
defeating ByteArray optimisation, and is no longer needed
anyway as it was only there to change the visible name.

  • bindings/js/JSImageDataCustom.cpp:

(WebCore::toJS):

Location:
trunk/Source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r104318 r104324  
     12012-01-06  Oliver Hunt  <oliver@apple.com>
     2
     3        DFG no longer optimises CanvasPixelArray
     4        https://bugs.webkit.org/show_bug.cgi?id=75729
     5
     6        Reviewed by Gavin Barraclough.
     7
     8        Rename ByteArray (in its ClassInfo) to Uint8ClampedArray to match
     9        the future name when we switch over to the new typed-array based
     10        ImageData specification.
     11
     12        * runtime/JSByteArray.cpp:
     13
    1142012-01-06  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
    215
  • trunk/Source/JavaScriptCore/runtime/JSByteArray.cpp

    r103083 r104324  
    3434namespace JSC {
    3535
    36 const ClassInfo JSByteArray::s_info = { "ByteArray", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(JSByteArray) };
     36const ClassInfo JSByteArray::s_info = { "Uint8ClampedArray", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(JSByteArray) };
    3737
    3838JSByteArray::JSByteArray(ExecState* exec, Structure* structure, ByteArray* storage)
  • trunk/Source/WebCore/ChangeLog

    r104322 r104324  
     12012-01-06  Oliver Hunt  <oliver@apple.com>
     2
     3        DFG no longer optimises CanvasPixelArray
     4        https://bugs.webkit.org/show_bug.cgi?id=75729
     5
     6        Reviewed by Gavin Barraclough.
     7
     8        Remove the custom ClassInfo for CanvasPixelArray as that is
     9        defeating ByteArray optimisation, and is no longer needed
     10        anyway as it was only there to change the visible name.
     11
     12        * bindings/js/JSImageDataCustom.cpp:
     13        (WebCore::toJS):
     14
    1152012-01-06  Ken Buchanan  <kenrb@chromium.org>
    216
  • trunk/Source/WebCore/bindings/js/JSImageDataCustom.cpp

    r101401 r104324  
    4848    wrapper = CREATE_DOM_WRAPPER(exec, globalObject, ImageData, imageData);
    4949    Identifier dataName(exec, "data");
    50     static const ClassInfo cpaClassInfo = { "CanvasPixelArray", &JSByteArray::s_info, 0, 0, CREATE_METHOD_TABLE(JSByteArray) };
    51     Structure* cpaStructure = getCachedDOMStructure(globalObject, &cpaClassInfo);
     50    Structure* cpaStructure = getCachedDOMStructure(globalObject, &JSByteArray::s_info);
    5251    if (!cpaStructure)
    53         cpaStructure = cacheDOMStructure(globalObject, JSByteArray::createStructure(exec->globalData(), globalObject, jsNull(), &cpaClassInfo), &cpaClassInfo);
     52        cpaStructure = cacheDOMStructure(globalObject, JSByteArray::createStructure(exec->globalData(), globalObject, jsNull(), &JSByteArray::s_info), &JSByteArray::s_info);
    5453    wrapper->putDirect(exec->globalData(), dataName, JSByteArray::create(exec, cpaStructure, imageData->data()->data()), DontDelete | ReadOnly);
    5554    exec->heap()->reportExtraMemoryCost(imageData->data()->length());
Note: See TracChangeset for help on using the changeset viewer.