diff options
author | Jason Sams <rjsams@android.com> | 2009-09-21 19:41:04 -0700 |
---|---|---|
committer | Jason Sams <rjsams@android.com> | 2009-09-21 19:41:04 -0700 |
commit | 768bc02d815a94ad29146f1ed60c847d1af118cc (patch) | |
tree | 1e7d9331f53bf4ef0ea3fdfbe7e6ff2e5c8940da /graphics/java/android/renderscript/RenderScript.java | |
parent | 88a83d3f108dcf01443b241439e14eedbd9615f5 (diff) | |
download | frameworks_base-768bc02d815a94ad29146f1ed60c847d1af118cc.zip frameworks_base-768bc02d815a94ad29146f1ed60c847d1af118cc.tar.gz frameworks_base-768bc02d815a94ad29146f1ed60c847d1af118cc.tar.bz2 |
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.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/graphics/java/android/renderscript/RenderScript.java b/graphics/java/android/renderscript/RenderScript.java index d35c5e3..5831d13 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); |