diff options
Diffstat (limited to 'graphics/java/android/renderscript/RenderScript.java')
-rw-r--r-- | graphics/java/android/renderscript/RenderScript.java | 99 |
1 files changed, 30 insertions, 69 deletions
diff --git a/graphics/java/android/renderscript/RenderScript.java b/graphics/java/android/renderscript/RenderScript.java index 7d4a5c4d1295..322a0457a77e 100644 --- a/graphics/java/android/renderscript/RenderScript.java +++ b/graphics/java/android/renderscript/RenderScript.java @@ -386,25 +386,10 @@ public class RenderScript { } - native void rsnAllocationData1D(int con, int id, int off, int mip, int count, int[] d, int sizeBytes); - synchronized void nAllocationData1D(int id, int off, int mip, int count, int[] d, int sizeBytes) { + native void rsnAllocationData1D(int con, int id, int off, int mip, int count, Object d, int sizeBytes, int dt); + synchronized void nAllocationData1D(int id, int off, int mip, int count, Object d, int sizeBytes, Element.DataType dt) { validate(); - rsnAllocationData1D(mContext, id, off, mip, count, d, sizeBytes); - } - native void rsnAllocationData1D(int con, int id, int off, int mip, int count, short[] d, int sizeBytes); - synchronized void nAllocationData1D(int id, int off, int mip, int count, short[] d, int sizeBytes) { - validate(); - rsnAllocationData1D(mContext, id, off, mip, count, d, sizeBytes); - } - native void rsnAllocationData1D(int con, int id, int off, int mip, int count, byte[] d, int sizeBytes); - synchronized void nAllocationData1D(int id, int off, int mip, int count, byte[] d, int sizeBytes) { - validate(); - rsnAllocationData1D(mContext, id, off, mip, count, d, sizeBytes); - } - native void rsnAllocationData1D(int con, int id, int off, int mip, int count, float[] d, int sizeBytes); - synchronized void nAllocationData1D(int id, int off, int mip, int count, float[] d, int sizeBytes) { - validate(); - rsnAllocationData1D(mContext, id, off, mip, count, d, sizeBytes); + rsnAllocationData1D(mContext, id, off, mip, count, d, sizeBytes, dt.mID); } native void rsnAllocationElementData1D(int con, int id, int xoff, int mip, int compIdx, byte[] d, int sizeBytes); @@ -433,26 +418,14 @@ public class RenderScript { srcMip, srcFace); } - native void rsnAllocationData2D(int con, int id, int xoff, int yoff, int mip, int face, int w, int h, byte[] d, int sizeBytes); - synchronized void nAllocationData2D(int id, int xoff, int yoff, int mip, int face, int w, int h, byte[] d, int sizeBytes) { + native void rsnAllocationData2D(int con, int id, int xoff, int yoff, int mip, int face, + int w, int h, Object d, int sizeBytes, int dt); + synchronized void nAllocationData2D(int id, int xoff, int yoff, int mip, int face, + int w, int h, Object d, int sizeBytes, Element.DataType dt) { validate(); - rsnAllocationData2D(mContext, id, xoff, yoff, mip, face, w, h, d, sizeBytes); - } - native void rsnAllocationData2D(int con, int id, int xoff, int yoff, int mip, int face, int w, int h, short[] d, int sizeBytes); - synchronized void nAllocationData2D(int id, int xoff, int yoff, int mip, int face, int w, int h, short[] d, int sizeBytes) { - validate(); - rsnAllocationData2D(mContext, id, xoff, yoff, mip, face, w, h, d, sizeBytes); - } - native void rsnAllocationData2D(int con, int id, int xoff, int yoff, int mip, int face, int w, int h, int[] d, int sizeBytes); - synchronized void nAllocationData2D(int id, int xoff, int yoff, int mip, int face, int w, int h, int[] d, int sizeBytes) { - validate(); - rsnAllocationData2D(mContext, id, xoff, yoff, mip, face, w, h, d, sizeBytes); - } - native void rsnAllocationData2D(int con, int id, int xoff, int yoff, int mip, int face, int w, int h, float[] d, int sizeBytes); - synchronized void nAllocationData2D(int id, int xoff, int yoff, int mip, int face, int w, int h, float[] d, int sizeBytes) { - validate(); - rsnAllocationData2D(mContext, id, xoff, yoff, mip, face, w, h, d, sizeBytes); + rsnAllocationData2D(mContext, id, xoff, yoff, mip, face, w, h, d, sizeBytes, dt.mID); } + native void rsnAllocationData2D(int con, int id, int xoff, int yoff, int mip, int face, Bitmap b); synchronized void nAllocationData2D(int id, int xoff, int yoff, int mip, int face, Bitmap b) { validate(); @@ -477,48 +450,36 @@ public class RenderScript { srcAlloc, srcXoff, srcYoff, srcZoff, srcMip); } - native void rsnAllocationData3D(int con, int id, int xoff, int yoff, int zoff, int mip, int w, int h, int depth, byte[] d, int sizeBytes); - synchronized void nAllocationData3D(int id, int xoff, int yoff, int zoff, int mip, int w, int h, int depth, byte[] d, int sizeBytes) { + native void rsnAllocationData3D(int con, int id, int xoff, int yoff, int zoff, int mip, + int w, int h, int depth, Object d, int sizeBytes, int dt); + synchronized void nAllocationData3D(int id, int xoff, int yoff, int zoff, int mip, + int w, int h, int depth, Object d, int sizeBytes, Element.DataType dt) { validate(); - rsnAllocationData3D(mContext, id, xoff, yoff, zoff, mip, w, h, depth, d, sizeBytes); - } - native void rsnAllocationData3D(int con, int id, int xoff, int yoff, int zoff, int mip, int w, int h, int depth, short[] d, int sizeBytes); - synchronized void nAllocationData3D(int id, int xoff, int yoff, int zoff, int mip, int w, int h, int depth, short[] d, int sizeBytes) { - validate(); - rsnAllocationData3D(mContext, id, xoff, yoff, zoff, mip, w, h, depth, d, sizeBytes); - } - native void rsnAllocationData3D(int con, int id, int xoff, int yoff, int zoff, int mip, int w, int h, int depth, int[] d, int sizeBytes); - synchronized void nAllocationData3D(int id, int xoff, int yoff, int zoff, int mip, int w, int h, int depth, int[] d, int sizeBytes) { - validate(); - rsnAllocationData3D(mContext, id, xoff, yoff, zoff, mip, w, h, depth, d, sizeBytes); - } - native void rsnAllocationData3D(int con, int id, int xoff, int yoff, int zoff, int mip, int w, int h, int depth, float[] d, int sizeBytes); - synchronized void nAllocationData3D(int id, int xoff, int yoff, int zoff, int mip, int w, int h, int depth, float[] d, int sizeBytes) { - validate(); - rsnAllocationData3D(mContext, id, xoff, yoff, zoff, mip, w, h, depth, d, sizeBytes); + rsnAllocationData3D(mContext, id, xoff, yoff, zoff, mip, w, h, depth, d, sizeBytes, dt.mID); } - - native void rsnAllocationRead(int con, int id, byte[] d); - synchronized void nAllocationRead(int id, byte[] d) { - validate(); - rsnAllocationRead(mContext, id, d); - } - native void rsnAllocationRead(int con, int id, short[] d); - synchronized void nAllocationRead(int id, short[] d) { + native void rsnAllocationRead(int con, int id, Object d, int dt); + synchronized void nAllocationRead(int id, Object d, Element.DataType dt) { validate(); - rsnAllocationRead(mContext, id, d); + rsnAllocationRead(mContext, id, d, dt.mID); } - native void rsnAllocationRead(int con, int id, int[] d); - synchronized void nAllocationRead(int id, int[] d) { + + native void rsnAllocationRead1D(int con, int id, int off, int mip, int count, Object d, + int sizeBytes, int dt); + synchronized void nAllocationRead1D(int id, int off, int mip, int count, Object d, + int sizeBytes, Element.DataType dt) { validate(); - rsnAllocationRead(mContext, id, d); + rsnAllocationRead1D(mContext, id, off, mip, count, d, sizeBytes, dt.mID); } - native void rsnAllocationRead(int con, int id, float[] d); - synchronized void nAllocationRead(int id, float[] d) { + + native void rsnAllocationRead2D(int con, int id, int xoff, int yoff, int mip, int face, + int w, int h, Object d, int sizeBytes, int dt); + synchronized void nAllocationRead2D(int id, int xoff, int yoff, int mip, int face, + int w, int h, Object d, int sizeBytes, Element.DataType dt) { validate(); - rsnAllocationRead(mContext, id, d); + rsnAllocationRead2D(mContext, id, xoff, yoff, mip, face, w, h, d, sizeBytes, dt.mID); } + native int rsnAllocationGetType(int con, int id); synchronized int nAllocationGetType(int id) { validate(); |