[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
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user