summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/RenderScript.java
diff options
context:
space:
mode:
authorMiao Wang <miaowang@google.com>2015-03-08 00:06:55 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-03-08 00:06:55 +0000
commitec89c1ea731256cd0d71ee58733b2855e1e6e4fa (patch)
tree9c7113c944b241c4fc27c65083cec6f81452c187 /rs/java/android/renderscript/RenderScript.java
parenteef3fbcf6825a5e5e0cb150123d9bc87956fbb23 (diff)
parenta61832c8fdff8cf086113f578032136c81935904 (diff)
am a61832c8: am 288e6f67: Merge "[RenderScript] AutoPadding & Unpadding for Vec3 Elements during copyTo & copyFrom."
* commit 'a61832c8fdff8cf086113f578032136c81935904': [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);