Chromium Code Reviews| Index: Source/WebCore/bindings/dart/custom/DartFloat32ArrayCustom.cpp |
| diff --git a/Source/WebCore/bindings/dart/custom/DartFloat32ArrayCustom.cpp b/Source/WebCore/bindings/dart/custom/DartFloat32ArrayCustom.cpp |
| index cb1e7e0cbf40b7028b838a6fe940a5262c548bc2..75ab02357f1e2171a902235b378cecfd9fa1b5a7 100644 |
| --- a/Source/WebCore/bindings/dart/custom/DartFloat32ArrayCustom.cpp |
| +++ b/Source/WebCore/bindings/dart/custom/DartFloat32ArrayCustom.cpp |
| @@ -30,20 +30,36 @@ |
| #include "config.h" |
| #include "DartFloat32Array.h" |
| +#include "DartArrayBufferViewCustom.h" |
| + |
| namespace WebCore { |
| -Dart_Handle toDartValue(Float32Array*) |
| +Dart_Handle toDartValue(Float32Array* value) |
| { |
| - DART_UNIMPLEMENTED(); |
| - return 0; |
| + // We may have to customize it, once typed arrays are in the VM. |
| + return DartDOMWrapper::toDart<DartFloat32Array>(value); |
| } |
| namespace DartFloat32ArrayInternal { |
| -void setElementsCallback(Dart_NativeArguments) |
| +void constructorCallback(Dart_NativeArguments args) |
| +{ |
| + WebCore::DartArrayBufferViewInternal::constructWebGLArray<Float32Array, float>(args); |
|
antonm
2012/01/18 15:12:23
up to you, but I'd rather have a generic class Dar
Nikolay
2012/01/19 13:27:34
Thanks for proposal, I just think it's more unifor
|
| +} |
| + |
| +void numericIndexSetterCallback(Dart_NativeArguments args) |
| +{ |
| + WebCore::DartArrayBufferViewInternal::indexSetter<Float32Array, float>(args); |
| +} |
| + |
| +void numericIndexGetterCallback(Dart_NativeArguments args) |
| +{ |
| + WebCore::DartArrayBufferViewInternal::indexGetter<Float32Array, float>(args); |
| +} |
| + |
| +void setElementsCallback(Dart_NativeArguments args) |
| { |
| - // FIXME: proper implementation. |
| - DART_UNIMPLEMENTED(); |
| + WebCore::DartArrayBufferViewInternal::setWebGLArrayHelper<Float32Array, DartFloat32Array>(args); |
| } |
| } |