diff options
author | Miao Wang <miaowang@google.com> | 2015-03-08 00:17:18 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-03-08 00:17:18 +0000 |
commit | 12d8a860b847170b3a751682efa151512e016542 (patch) | |
tree | fa497434c786f2c8c4ce5c41a13dcd7f20725d74 /rs/java/android/renderscript/RenderScript.java | |
parent | d73ff8727ddd88a0f983acc55cbe8d8d3a223993 (diff) | |
parent | ec89c1ea731256cd0d71ee58733b2855e1e6e4fa (diff) |
am ec89c1ea: am a61832c8: am 288e6f67: Merge "[RenderScript] AutoPadding & Unpadding for Vec3 Elements during copyTo & copyFrom."
* commit 'ec89c1ea731256cd0d71ee58733b2855e1e6e4fa':
[RenderScript] AutoPadding & Unpadding for Vec3 Elements during copyTo & copyFrom.
Diffstat (limited to 'rs/java/android/renderscript/RenderScript.java')
-rw-r--r-- | rs/java/android/renderscript/RenderScript.java | 53 |
1 files changed, 32 insertions, 21 deletions
diff --git a/rs/java/android/renderscript/RenderScript.java b/rs/java/android/renderscript/RenderScript.java index 1f3b63e864fa..6c32238e8319 100644 --- a/rs/java/android/renderscript/RenderScript.java +++ b/rs/java/android/renderscript/RenderScript.java @@ -484,10 +484,12 @@ public class RenderScript { } - native void rsnAllocationData1D(long con, long id, int off, int mip, int count, Object d, int sizeBytes, int dt); - synchronized void nAllocationData1D(long id, int off, int mip, int count, Object d, int sizeBytes, Element.DataType dt) { + native void rsnAllocationData1D(long con, long id, int off, int mip, int count, Object d, int sizeBytes, int dt, + int mSize, boolean usePadding); + synchronized void nAllocationData1D(long id, int off, int mip, int count, Object d, int sizeBytes, Element.DataType dt, + int mSize, boolean usePadding) { validate(); - rsnAllocationData1D(mContext, id, off, mip, count, d, sizeBytes, dt.mID); + rsnAllocationData1D(mContext, id, off, mip, count, d, sizeBytes, dt.mID, mSize, usePadding); } native void rsnAllocationElementData(long con,long id, int xoff, int yoff, int zoff, int mip, int compIdx, byte[] d, int sizeBytes); @@ -517,11 +519,13 @@ public class RenderScript { } native void rsnAllocationData2D(long con, long id, int xoff, int yoff, int mip, int face, - int w, int h, Object d, int sizeBytes, int dt); + int w, int h, Object d, int sizeBytes, int dt, + int mSize, boolean usePadding); synchronized void nAllocationData2D(long id, int xoff, int yoff, int mip, int face, - int w, int h, Object d, int sizeBytes, Element.DataType dt) { + int w, int h, Object d, int sizeBytes, Element.DataType dt, + int mSize, boolean usePadding) { validate(); - rsnAllocationData2D(mContext, id, xoff, yoff, mip, face, w, h, d, sizeBytes, dt.mID); + rsnAllocationData2D(mContext, id, xoff, yoff, mip, face, w, h, d, sizeBytes, dt.mID, mSize, usePadding); } native void rsnAllocationData2D(long con, long id, int xoff, int yoff, int mip, int face, Bitmap b); @@ -549,25 +553,28 @@ public class RenderScript { } native void rsnAllocationData3D(long con, long id, int xoff, int yoff, int zoff, int mip, - int w, int h, int depth, Object d, int sizeBytes, int dt); + int w, int h, int depth, Object d, int sizeBytes, int dt, + int mSize, boolean usePadding); synchronized void nAllocationData3D(long id, int xoff, int yoff, int zoff, int mip, - int w, int h, int depth, Object d, int sizeBytes, Element.DataType dt) { + int w, int h, int depth, Object d, int sizeBytes, Element.DataType dt, + int mSize, boolean usePadding) { validate(); - rsnAllocationData3D(mContext, id, xoff, yoff, zoff, mip, w, h, depth, d, sizeBytes, dt.mID); + rsnAllocationData3D(mContext, id, xoff, yoff, zoff, mip, w, h, depth, d, sizeBytes, + dt.mID, mSize, usePadding); } - native void rsnAllocationRead(long con, long id, Object d, int dt); - synchronized void nAllocationRead(long id, Object d, Element.DataType dt) { + native void rsnAllocationRead(long con, long id, Object d, int dt, int mSize, boolean usePadding); + synchronized void nAllocationRead(long id, Object d, Element.DataType dt, int mSize, boolean usePadding) { validate(); - rsnAllocationRead(mContext, id, d, dt.mID); + rsnAllocationRead(mContext, id, d, dt.mID, mSize, usePadding); } native void rsnAllocationRead1D(long con, long id, int off, int mip, int count, Object d, - int sizeBytes, int dt); + int sizeBytes, int dt, int mSize, boolean usePadding); synchronized void nAllocationRead1D(long id, int off, int mip, int count, Object d, - int sizeBytes, Element.DataType dt) { + int sizeBytes, Element.DataType dt, int mSize, boolean usePadding) { validate(); - rsnAllocationRead1D(mContext, id, off, mip, count, d, sizeBytes, dt.mID); + rsnAllocationRead1D(mContext, id, off, mip, count, d, sizeBytes, dt.mID, mSize, usePadding); } native void rsnAllocationElementRead(long con,long id, int xoff, int yoff, int zoff, @@ -580,19 +587,23 @@ public class RenderScript { } native void rsnAllocationRead2D(long con, long id, int xoff, int yoff, int mip, int face, - int w, int h, Object d, int sizeBytes, int dt); + int w, int h, Object d, int sizeBytes, int dt, + int mSize, boolean usePadding); synchronized void nAllocationRead2D(long id, int xoff, int yoff, int mip, int face, - int w, int h, Object d, int sizeBytes, Element.DataType dt) { + int w, int h, Object d, int sizeBytes, Element.DataType dt, + int mSize, boolean usePadding) { validate(); - rsnAllocationRead2D(mContext, id, xoff, yoff, mip, face, w, h, d, sizeBytes, dt.mID); + rsnAllocationRead2D(mContext, id, xoff, yoff, mip, face, w, h, d, sizeBytes, dt.mID, mSize, usePadding); } native void rsnAllocationRead3D(long con, long id, int xoff, int yoff, int zoff, int mip, - int w, int h, int depth, Object d, int sizeBytes, int dt); + int w, int h, int depth, Object d, int sizeBytes, int dt, + int mSize, boolean usePadding); synchronized void nAllocationRead3D(long id, int xoff, int yoff, int zoff, int mip, - int w, int h, int depth, Object d, int sizeBytes, Element.DataType dt) { + int w, int h, int depth, Object d, int sizeBytes, Element.DataType dt, + int mSize, boolean usePadding) { validate(); - rsnAllocationRead3D(mContext, id, xoff, yoff, zoff, mip, w, h, depth, d, sizeBytes, dt.mID); + rsnAllocationRead3D(mContext, id, xoff, yoff, zoff, mip, w, h, depth, d, sizeBytes, dt.mID, mSize, usePadding); } native long rsnAllocationGetType(long con, long id); |