Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(419)

Issue 11881031: Add Dart class for _ExternalUint8ClampedArray and API to allocate it. (Closed)

Created:
7 years, 11 months ago by srdjan
Modified:
7 years, 11 months ago
Reviewers:
Anton Muhin, siva
CC:
reviews_dartlang.org, Anton Muhin
Visibility:
Public.

Description

Add Dart class for _ExternalUint8ClampedArray and API to allocate it. Committed: https://code.google.com/p/dart/source/detail?r=17040

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 6

Patch Set 4 : #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+203 lines, -8 lines) Patch
M runtime/include/dart_api.h View 1 2 3 1 chunk +20 lines, -0 lines 1 comment Download
M runtime/lib/byte_array.cc View 1 2 3 1 chunk +12 lines, -0 lines 0 comments Download
M runtime/lib/byte_array.dart View 1 2 3 1 chunk +52 lines, -0 lines 0 comments Download
M runtime/vm/bootstrap_natives.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/vm/dart_api_impl.cc View 1 2 3 1 chunk +16 lines, -0 lines 0 comments Download
M runtime/vm/dart_api_impl_test.cc View 1 2 3 2 chunks +58 lines, -5 lines 0 comments Download
M tests/standalone/byte_array_test.dart View 1 2 3 10 chunks +43 lines, -3 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
srdjan
7 years, 11 months ago (2013-01-14 23:40:58 UTC) #1
siva
lgtm https://codereview.chromium.org/11881031/diff/4003/runtime/include/dart_api.h File runtime/include/dart_api.h (right): https://codereview.chromium.org/11881031/diff/4003/runtime/include/dart_api.h#newcode1676 runtime/include/dart_api.h:1676: * 8-bit bytes. Maybe we should also add ...
7 years, 11 months ago (2013-01-15 00:54:23 UTC) #2
srdjan
Thanks! https://codereview.chromium.org/11881031/diff/4003/runtime/include/dart_api.h File runtime/include/dart_api.h (right): https://codereview.chromium.org/11881031/diff/4003/runtime/include/dart_api.h#newcode1676 runtime/include/dart_api.h:1676: * 8-bit bytes. On 2013/01/15 00:54:23, siva wrote: ...
7 years, 11 months ago (2013-01-15 01:11:10 UTC) #3
Anton Muhin
7 years, 11 months ago (2013-01-15 10:11:42 UTC) #4
Message was sent while issue was closed.
https://codereview.chromium.org/11881031/diff/5013/runtime/include/dart_api.h
File runtime/include/dart_api.h (right):

https://codereview.chromium.org/11881031/diff/5013/runtime/include/dart_api.h...
runtime/include/dart_api.h:1688: DART_EXPORT Dart_Handle
Dart_NewExternalClampedByteArray(
It may be only me, but when I first time met the name Dart_NewExternalByteArray
I was 100% that it allocates an instance of ByteArray, not Uint8List.  May we
rename those methods?

Another issue: are you going to add eventually methods for all the array kinds? 
or maybe an ueber method taking kind as an argument.

Right now we've got in somewhat strange situation when some types can be
allocated directly while others cannot.

Surprisingly, to some extent it was better before as the only option one had was
to allocate Uint8List and then reuse its storage in some other view.

Powered by Google App Engine
This is Rietveld 408576698