Commit 4b7b9f97 authored by oliver@apple.com's avatar oliver@apple.com

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):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@104324 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent e89f05e8
2012-01-06 Oliver Hunt <oliver@apple.com>
DFG no longer optimises CanvasPixelArray
https://bugs.webkit.org/show_bug.cgi?id=75729
Reviewed by Gavin Barraclough.
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:
2012-01-06 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
Use HashMap<OwnPtr> for SourceProviderCache items
......@@ -33,7 +33,7 @@ using namespace WTF;
namespace JSC {
const ClassInfo JSByteArray::s_info = { "ByteArray", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(JSByteArray) };
const ClassInfo JSByteArray::s_info = { "Uint8ClampedArray", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(JSByteArray) };
JSByteArray::JSByteArray(ExecState* exec, Structure* structure, ByteArray* storage)
: JSNonFinalObject(exec->globalData(), structure)
......
2012-01-06 Oliver Hunt <oliver@apple.com>
DFG no longer optimises CanvasPixelArray
https://bugs.webkit.org/show_bug.cgi?id=75729
Reviewed by Gavin Barraclough.
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):
2012-01-06 Ken Buchanan <kenrb@chromium.org>
ASSERT failure due to combine-text with preceding spaces
......@@ -47,10 +47,9 @@ JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, ImageData* imageD
wrapper = CREATE_DOM_WRAPPER(exec, globalObject, ImageData, imageData);
Identifier dataName(exec, "data");
static const ClassInfo cpaClassInfo = { "CanvasPixelArray", &JSByteArray::s_info, 0, 0, CREATE_METHOD_TABLE(JSByteArray) };
Structure* cpaStructure = getCachedDOMStructure(globalObject, &cpaClassInfo);
Structure* cpaStructure = getCachedDOMStructure(globalObject, &JSByteArray::s_info);
if (!cpaStructure)
cpaStructure = cacheDOMStructure(globalObject, JSByteArray::createStructure(exec->globalData(), globalObject, jsNull(), &cpaClassInfo), &cpaClassInfo);
cpaStructure = cacheDOMStructure(globalObject, JSByteArray::createStructure(exec->globalData(), globalObject, jsNull(), &JSByteArray::s_info), &JSByteArray::s_info);
wrapper->putDirect(exec->globalData(), dataName, JSByteArray::create(exec, cpaStructure, imageData->data()->data()), DontDelete | ReadOnly);
exec->heap()->reportExtraMemoryCost(imageData->data()->length());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment