* Added a new JNI call to pass arrays of Allocations to the RS runtime.
* Added a new version of ForEach that takes an array of Allocations.
* Added some casts to disambiguate existing calls to forEach.
Change-Id: I46d2834c37075b2a2407fd8b010546818a4540d1
Bug: 15756600
This change also adds a TODO/FIXME related to subAlign() and our tracking
mechanism for it. We need to further investigate how to make subAlign() work
properly if a user copies their FieldPacker.
Change-Id: I861e529abd11e378f7c73b510d7f418b940fe480
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
In these RS API calls, it is possible (and very likely) that some Java objects
are written to via JNI calls into the RS driver. These writes can end up being
discarded if we specify JNI_ABORT, particularly if the Java object has been
moved due to GC. The change introduces a readonly mode for some macro calls
and updates other JNI callers to appropriately skip JNI_ABORT.
Change-Id: I8c5f2ae959b3fbc9008c9d2ac4542f2ebab29b06
rsnContextSetSurfaceTexture() has no implementation in rs-jni, use nContextSetSurface() in setSurfaceTexture().
Change-Id: I066432575c9e74f21ea3a3776628b572b6e31377
Signed-off-by: Xiaofei Wan <xiaofei.wan@intel.com>
Use uintptr_t for pointers (and not uint32_t) and
also don't assume that size_t is 32 bits wide.
Also uses java longs for passing pointers across
JNI boundaries.
Change-Id: Ie52bd8ae967fbddc911eda3a43cc799d53bbce66
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
Changes include
[x] Some JNI functions, with return type jlong, casts
pointer to jint before returning it. This has been fixed.
[x] Minor JNI function prototype changes where
formal paramter type has been changed to a JNI
type (int to jint for example).
[x] long is used for ScriptC, Sampler, Font, ProgramStore
handles as they can be 64-bit.
[x] A new hidden constructor ScriptC(long, RenderScript)
has been added. This should eventually replace public
API method ScriptC(int, RenderScript).
[x] Font and FileA3D use getNativeAsset instead of getAssetInt
to get Asset Handles. The getAssetInt method will be
deprecated in favor of getNativeAsset, as the former does
not support 64-bit.
[x] rsnPathCreate method accepts loop as an int. This should
be long as the underlying RS function assumes this to be
a pointer.
Change-Id: I919d857e5933febe63966049da83de9f9adee6f5
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>