summaryrefslogtreecommitdiff
path: root/graphics/java/android/renderscript/RenderScript.java
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-09-21 22:42:28 -0400
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-09-21 22:42:28 -0400
commitcd263b5c072703e80fe43e46baa831304441369b (patch)
treef325d5e787a857d224f965bcc38c79b60ace60ee /graphics/java/android/renderscript/RenderScript.java
parent9bbd5ee49f4a26b87273c40a955557e63f10da3b (diff)
parent768bc02d815a94ad29146f1ed60c847d1af118cc (diff)
Merge change 26322 into eclair
* changes: Implement more type checks on Allocations. Add tracking for allocations created using the "sized" helper. Add more param validation for data upload calls.
Diffstat (limited to 'graphics/java/android/renderscript/RenderScript.java')
-rw-r--r--graphics/java/android/renderscript/RenderScript.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/graphics/java/android/renderscript/RenderScript.java b/graphics/java/android/renderscript/RenderScript.java
index d35c5e302207..5831d1362772 100644
--- a/graphics/java/android/renderscript/RenderScript.java
+++ b/graphics/java/android/renderscript/RenderScript.java
@@ -80,7 +80,7 @@ public class RenderScript {
native int nFileOpen(byte[] name);
native void nElementBegin();
- native void nElementAdd(int kind, int type, int norm, int bits, String s);
+ native void nElementAdd(int kind, int type, boolean norm, int bits, String s);
native int nElementCreate();
native void nTypeBegin(int elementID);
@@ -90,17 +90,19 @@ public class RenderScript {
native void nTypeSetupFields(Type t, int[] types, int[] bits, Field[] IDs);
native int nAllocationCreateTyped(int type);
- native int nAllocationCreateSized(int elem, int count);
+ //native int nAllocationCreateSized(int elem, int count);
native int nAllocationCreateFromBitmap(int dstFmt, boolean genMips, Bitmap bmp);
native int nAllocationCreateFromBitmapBoxed(int dstFmt, boolean genMips, Bitmap bmp);
native int nAllocationCreateFromAssetStream(int dstFmt, boolean genMips, int assetStream);
native void nAllocationUploadToTexture(int alloc, int baseMioLevel);
native void nAllocationUploadToBufferObject(int alloc);
- native void nAllocationData(int id, int[] d, int sizeBytes);
- native void nAllocationData(int id, float[] d, int sizeBytes);
+
native void nAllocationSubData1D(int id, int off, int count, int[] d, int sizeBytes);
+ native void nAllocationSubData1D(int id, int off, int count, short[] d, int sizeBytes);
+ native void nAllocationSubData1D(int id, int off, int count, byte[] d, int sizeBytes);
native void nAllocationSubData1D(int id, int off, int count, float[] d, int sizeBytes);
+
native void nAllocationSubData2D(int id, int xoff, int yoff, int w, int h, int[] d, int sizeBytes);
native void nAllocationSubData2D(int id, int xoff, int yoff, int w, int h, float[] d, int sizeBytes);
native void nAllocationRead(int id, int[] d);