[RenderScript] Add API to map Allocation mallocptr to Java ByteBuffer
- Construct the ByteBuffer using the AllocationGetPointer when running
on L+ devices, otherwise create a read-only ByteBuffer and
explicitly copy the data from Allocation to it.
- Add an API to query the stride of the allocation.
- Both ByteBuffer and Stride will be cached for normal Allocations.
if using USAGE_IO, since after each ioReceive, the mallocPtr will
change, getByteBuffer will always create a new one using the most
up-to-date mallocPtr.
Bug: 25926361
Change-Id: I3ac187ffc598d07362abb704ec3393ae2b8b892a
3 files changed