AArch64: Use long for pointers in RS Java/JNI code

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>
This commit is contained in:
Ashok Bhat
2014-02-04 14:57:58 +00:00
committed by David Butcher
parent bc80e40b16
commit 0e0c0885ae
8 changed files with 96 additions and 87 deletions

View File

@@ -146,7 +146,7 @@ public class ProgramStore extends BaseObj {
BlendDstFunc mBlendDst;
boolean mDither;
ProgramStore(int id, RenderScript rs) {
ProgramStore(long id, RenderScript rs) {
super(id, rs);
}
@@ -421,7 +421,7 @@ public class ProgramStore extends BaseObj {
*/
public ProgramStore create() {
mRS.validate();
int id = mRS.nProgramStoreCreate(mColorMaskR, mColorMaskG, mColorMaskB, mColorMaskA,
long id = mRS.nProgramStoreCreate(mColorMaskR, mColorMaskG, mColorMaskB, mColorMaskA,
mDepthMask, mDither,
mBlendSrc.mID, mBlendDst.mID, mDepthFunc.mID);
ProgramStore programStore = new ProgramStore(id, mRS);