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

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') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/include/dart_api.h
===================================================================
--- runtime/include/dart_api.h (revision 17039)
+++ runtime/include/dart_api.h (working copy)
@@ -1672,6 +1672,26 @@
Dart_PeerFinalizer callback);
/**
+ * Returns a clamped ByteArray which references an external array of
+ * 8-bit bytes.
+ * A clamped ByteArray differs from ByteArray above in the indexed store
+ * operation where negative values are clamped to 0 and values above 255 are
+ * clamped to 255.
+ *
+ * \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 clamped ByteArray object if no error occurs. Otherwise returns
+ * an error handle.
+ */
+DART_EXPORT Dart_Handle Dart_NewExternalClampedByteArray(
Anton Muhin 2013/01/15 10:11:43 It may be only me, but when I first time met the n
+ 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698