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

Unified Diff: runtime/include/dart_api.h

Issue 11881031: Add Dart class for _ExternalUint8ClampedArray and API to allocate it. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/lib/byte_array.cc » ('j') | runtime/lib/byte_array.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/include/dart_api.h
===================================================================
--- runtime/include/dart_api.h (revision 17018)
+++ runtime/include/dart_api.h (working copy)
@@ -1672,6 +1672,23 @@
Dart_PeerFinalizer callback);
/**
+ * Returns a clamped ByteArray which references an external array of
+ * 8-bit bytes.
siva 2013/01/15 00:54:23 Maybe we should also add a line here which explain
srdjan 2013/01/15 01:11:10 Done.
+ *
+ * \param value An array of 8-bit bytes. This array must not move.
+ * \param length The length of the array.
+ * \param peer An external pointer to associate with this byte array.
+ *
+ * \return The ByteArray object if no error occurs. Otherwise returns
siva 2013/01/15 00:54:23 The clamped ByteArray object if
srdjan 2013/01/15 01:11:10 Done.
+ * an error handle.
+ */
+DART_EXPORT Dart_Handle Dart_NewExternalClampedByteArray(
+ uint8_t* data,
+ intptr_t length,
+ void* peer,
+ Dart_PeerFinalizer callback);
+
+/**
* Retrieves the data pointer associated with an external ByteArray.
*/
DART_EXPORT Dart_Handle Dart_ExternalByteArrayGetData(Dart_Handle object,
« no previous file with comments | « no previous file | runtime/lib/byte_array.cc » ('j') | runtime/lib/byte_array.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698