From b05d689653b1bc94836f716f29e9578677c29075 Mon Sep 17 00:00:00 2001 From: Jason Sams Date: Tue, 9 Apr 2013 15:59:24 -0700 Subject: Cleanup Allocation and add 3D copies. bug 8567058 Change-Id: Ib05ff3de851bccfea1531ca6c1801153632a2a85 --- .../java/android/renderscript/RenderScript.java | 45 +++++++++++++++++++--- 1 file changed, 40 insertions(+), 5 deletions(-) (limited to 'graphics/java/android/renderscript/RenderScript.java') diff --git a/graphics/java/android/renderscript/RenderScript.java b/graphics/java/android/renderscript/RenderScript.java index bef28aa89709..5d72267a440b 100644 --- a/graphics/java/android/renderscript/RenderScript.java +++ b/graphics/java/android/renderscript/RenderScript.java @@ -420,6 +420,46 @@ public class RenderScript { rsnAllocationData2D(mContext, id, xoff, yoff, mip, face, b); } + native void rsnAllocationData3D(int con, + int dstAlloc, int dstXoff, int dstYoff, int dstZoff, + int dstMip, + int width, int height, int depth, + int srcAlloc, int srcXoff, int srcYoff, int srcZoff, + int srcMip); + synchronized void nAllocationData3D(int dstAlloc, int dstXoff, int dstYoff, int dstZoff, + int dstMip, + int width, int height, int depth, + int srcAlloc, int srcXoff, int srcYoff, int srcZoff, + int srcMip) { + validate(); + rsnAllocationData3D(mContext, + dstAlloc, dstXoff, dstYoff, dstZoff, + dstMip, width, height, depth, + 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) { + 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); + } + + native void rsnAllocationRead(int con, int id, byte[] d); synchronized void nAllocationRead(int id, byte[] d) { validate(); @@ -451,11 +491,6 @@ public class RenderScript { validate(); rsnAllocationResize1D(mContext, id, dimX); } - native void rsnAllocationResize2D(int con, int id, int dimX, int dimY); - synchronized void nAllocationResize2D(int id, int dimX, int dimY) { - validate(); - rsnAllocationResize2D(mContext, id, dimX, dimY); - } native int rsnFileA3DCreateFromAssetStream(int con, int assetStream); synchronized int nFileA3DCreateFromAssetStream(int assetStream) { -- cgit v1.2.3