diff options
author | Miao Wang <miaowang@google.com> | 2015-10-26 17:44:10 -0700 |
---|---|---|
committer | Miao Wang <miaowang@google.com> | 2016-01-26 14:40:44 -0800 |
commit | 8c1509249c5552270d8accc2c9512f499a8f5e2d (patch) | |
tree | 1eb1ed7548cda13c54d19d96b6fb86bcee88520d /rs/java/android/renderscript/RenderScript.java | |
parent | ed50f333fb28905f085473d3150f906f0106295a (diff) |
[RenderScript] Implement APIs for better multi-frame process support.
Bug: 23535524
Two APIs added for multiframe processing:
- createAllocations(...): To create an array of Allocations sharing the
same Type and Usage. For USAGE_IO_INPUT Allocations, they also share
the same BufferQueue.
- getTimeStamp(): API to retrieve the time stamp associated with the
most recent buffer.
Change-Id: I6b7b35d7dca5e87ee2f3db2ee17cb9cf824bcfe1
Diffstat (limited to 'rs/java/android/renderscript/RenderScript.java')
-rw-r--r-- | rs/java/android/renderscript/RenderScript.java | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/rs/java/android/renderscript/RenderScript.java b/rs/java/android/renderscript/RenderScript.java index 4788223b4357..51fc7dd06232 100644 --- a/rs/java/android/renderscript/RenderScript.java +++ b/rs/java/android/renderscript/RenderScript.java @@ -484,7 +484,6 @@ public class RenderScript { rsnAllocationCopyToBitmap(mContext, alloc, bmp); } - native void rsnAllocationSyncAll(long con, long alloc, int src); synchronized void nAllocationSyncAll(long alloc, int src) { validate(); @@ -497,6 +496,16 @@ public class RenderScript { return rsnAllocationGetByteBuffer(mContext, alloc, stride, xBytesSize, dimY, dimZ); } + native void rsnAllocationSetupBufferQueue(long con, long alloc, int numAlloc); + synchronized void nAllocationSetupBufferQueue(long alloc, int numAlloc) { + validate(); + rsnAllocationSetupBufferQueue(mContext, alloc, numAlloc); + } + native void rsnAllocationShareBufferQueue(long con, long alloc1, long alloc2); + synchronized void nAllocationShareBufferQueue(long alloc1, long alloc2) { + validate(); + rsnAllocationShareBufferQueue(mContext, alloc1, alloc2); + } native Surface rsnAllocationGetSurface(long con, long alloc); synchronized Surface nAllocationGetSurface(long alloc) { validate(); @@ -512,13 +521,12 @@ public class RenderScript { validate(); rsnAllocationIoSend(mContext, alloc); } - native void rsnAllocationIoReceive(long con, long alloc); - synchronized void nAllocationIoReceive(long alloc) { + native long rsnAllocationIoReceive(long con, long alloc); + synchronized long nAllocationIoReceive(long alloc) { validate(); - rsnAllocationIoReceive(mContext, alloc); + return rsnAllocationIoReceive(mContext, alloc); } - native void rsnAllocationGenerateMipmaps(long con, long alloc); synchronized void nAllocationGenerateMipmaps(long alloc) { validate(); |