Bug: 23159764
Bug: 26862970
- Add detailed description of AutoPadding
- Add comments to all the copy related APIs.
- Fix typos in the comments.
Change-Id: I2d045e0d90efd94f1407f88d3e35bcd42ea93fb9
Bug: 28242626
Bug: 27972184
Bug: 27973681
This is resolving issues in ScriptGroup (V1) again.
In ScriptGroup.destroy(), we also need to consider the old API where
mClosures is not initialized.
Also cleaned up the finalizer for ScriptGroup and Allocation:
Since BaseObj.finalize() calls BaseObj.helpDestroy(), instead of
BaseObj.destroy(), there is no possibility that the finalizers of
child objects may race their parents finalizers. Note that
helpDestroy() does not try to recurse on child objects.
Change-Id: I9dbb2b60f8478f656f8a418c2b5fc8d6848aeef0
Bug: 27719830
To turn on warnings, apps have to add to their Activity.onCreate() method
the following code.
StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
.detectLeakedClosableObjects()
.penaltyLog()
.build());
For Slang generated ScriptC derived classes, we assume their
constructors won't throw exceptions after calling the ScriptC
constructor. In addition, ScriptIntrinsic derived classes do not seem
to throw exceptions in their constructors either. Therefore, we can
leave the guard.open() call in the Script constructor. This may be
only an approximation, but allows us to add CloseGuard for script
objects without making changes to slang.
Change-Id: I77ed45239a60b85af5c811dee6c124fb53da9060
(cherry picked from commit eb4dd08ec132f83745b8b28fa7da58eb4478b5b9)
Bug: http://b/25982676
Instead of returning null from validateObjectIsPrimitiveArray, fail with
an exception. The callers of this function do not check for null.
Change-Id: Idd2b50a7b137e8d2db7a334bb9a48c1b19ee2403
http://b/27251511
Allow copyTo(short[]), copyFrom(short[]), and their 1D range and 2D
range variants to copy data between short[] arrays and Float16
Allocations.
Change-Id: I370584685c3b773c165bd718974ca736ed548339
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
Bug: 25926361
Bug: 23535524
- Construct the ByteBuffer using the AllocationGetPointer.
- 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.
Change-Id: I5e84b6690e83bb062c383043275524d0e51e46eb
autoPadding added.
- This CL fixes recent CTS failures about copyPadded after
lmp-mr1-dev changes pushed to aosp.
Change-Id: Ica1f4fd934cd83ca4357ea7e7c82dcc7f844b689
* commit 'caa8a8fb9849f1d44ffab3117950ac1e7b02cd4d':
[Renderscript] JAVA API update for Allocation.CopyTo add the following functions to make it more symmetric to copyFrom().
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
automerge: 58fd96c
* commit '58fd96c607de7f7f821a0b15fd37bc28323fcfde':
make Allocation.destroy() include setSurface(null) for USAGE_IO_OUTPUT (Native RS)
We need larger buffers to handle 64-bit RS object types, but 32-bit code
will never fill all of the getData().length bytes. This allows us to retain
our verification code.
We have to modify an existing use of FieldPacker that was doing partial
updates of the underlying buffer. This was really relying on the old data
to be implicitly selected and written back, but that is not guaranteed by
the original API. This also required a fix to the FieldPacker.reset() API,
which was not allowing the FieldPacker to ever point to the final entry in
its buffer.
Change-Id: Idcd52790ac2b0ab1eff3f043e7eec2832953f04b
This change consolidates the copy paths to Object based.
The runtime now uses reflection to identify the type of
array present. This adds support for long/double and reduces
the amount of code present. We could also support arrays of vectors
or objects in the future with this mechanism.
Change-Id: I2297c1c01fbe6a64c375d6368f25d7db781ea788