diff options
author | Miao Wang <miaowang@google.com> | 2015-02-20 18:36:32 -0800 |
---|---|---|
committer | Miao Wang <miaowang@google.com> | 2015-02-25 16:41:09 -0800 |
commit | c8e237e27165c7f7855ed0b077cfe5f1e54908ef (patch) | |
tree | 4d489f081da0501f790de2318b2ea012b9222645 /rs/java/android/renderscript/RenderScript.java | |
parent | 0d8b97a44e4cb5c5cfffd6421eb2cec1ebc00d2f (diff) | |
download | frameworks_base-c8e237e27165c7f7855ed0b077cfe5f1e54908ef.zip frameworks_base-c8e237e27165c7f7855ed0b077cfe5f1e54908ef.tar.gz frameworks_base-c8e237e27165c7f7855ed0b077cfe5f1e54908ef.tar.bz2 |
[Renderscript] JAVA API update for Allocation.CopyTo
add the following functions to make it more symmetric to copyFrom().
- copy1DRangeToUnchecked, copy1DRangeTo
- copy2DRangeToUnchecked, copy2DRangeTo
- copy3DRangeToUnchecked, copy3DRangeTo
- setFromFieldPacker, 2D and 3D variants
- copyElementTo, (1D, 2D & 3D)
Change-Id: I6b896123e1c00cead552aa5b31a701b15dd70f85
Diffstat (limited to 'rs/java/android/renderscript/RenderScript.java')
-rw-r--r-- | rs/java/android/renderscript/RenderScript.java | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/rs/java/android/renderscript/RenderScript.java b/rs/java/android/renderscript/RenderScript.java index 417bfe2..3b40431 100644 --- a/rs/java/android/renderscript/RenderScript.java +++ b/rs/java/android/renderscript/RenderScript.java @@ -491,10 +491,10 @@ public class RenderScript { rsnAllocationData1D(mContext, id, off, mip, count, d, sizeBytes, dt.mID); } - native void rsnAllocationElementData1D(long con,long id, int xoff, int mip, int compIdx, byte[] d, int sizeBytes); - synchronized void nAllocationElementData1D(long id, int xoff, int mip, int compIdx, byte[] d, int sizeBytes) { + native void rsnAllocationElementData(long con,long id, int xoff, int yoff, int zoff, int mip, int compIdx, byte[] d, int sizeBytes); + synchronized void nAllocationElementData(long id, int xoff, int yoff, int zoff, int mip, int compIdx, byte[] d, int sizeBytes) { validate(); - rsnAllocationElementData1D(mContext, id, xoff, mip, compIdx, d, sizeBytes); + rsnAllocationElementData(mContext, id, xoff, yoff, zoff, mip, compIdx, d, sizeBytes); } native void rsnAllocationData2D(long con, @@ -571,6 +571,15 @@ public class RenderScript { rsnAllocationRead1D(mContext, id, off, mip, count, d, sizeBytes, dt.mID); } + native void rsnAllocationElementRead(long con,long id, int xoff, int yoff, int zoff, + int mip, int compIdx, Object d, int sizeBytes, int dt); + synchronized void nAllocationElementRead(long id, int xoff, int yoff, int zoff, + int mip, int compIdx, Object d, int sizeBytes, + Element.DataType dt) { + validate(); + rsnAllocationElementRead(mContext, id, xoff, yoff, zoff, mip, compIdx, d, sizeBytes, dt.mID); + } + 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); synchronized void nAllocationRead2D(long id, int xoff, int yoff, int mip, int face, @@ -579,6 +588,14 @@ public class RenderScript { rsnAllocationRead2D(mContext, id, xoff, yoff, mip, face, w, h, d, sizeBytes, dt.mID); } + 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); + 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) { + validate(); + rsnAllocationRead3D(mContext, id, xoff, yoff, zoff, mip, w, h, depth, d, sizeBytes, dt.mID); + } + native long rsnAllocationGetType(long con, long id); synchronized long nAllocationGetType(long id) { validate(); |