summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/RenderScript.java
diff options
context:
space:
mode:
authorMiao Wang <miaowang@google.com>2015-03-05 23:49:57 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-03-05 23:49:57 +0000
commit288e6f67181ce74ec4b97b61def1b9510b1221d0 (patch)
tree8dfa9fbf8922202f4c95445c6f05eba4d42a18b0 /rs/java/android/renderscript/RenderScript.java
parent701f9c2fd8d4e31c5ed3a51e4767d4aeb9b20c40 (diff)
parent87e908dfdece91b5f504386d4901fa3342dc8083 (diff)
Merge "[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.java53
1 files changed, 32 insertions, 21 deletions
diff --git a/rs/java/android/renderscript/RenderScript.java b/rs/java/android/renderscript/RenderScript.java
index 3b40431d7c34..29004c5a16b1 100644
--- a/rs/java/android/renderscript/RenderScript.java
+++ b/rs/java/android/renderscript/RenderScript.java
@@ -485,10 +485,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);
@@ -518,11 +520,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);
@@ -550,25 +554,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,
@@ -581,19 +588,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);