AArch64: Make graphics classes 64-bit compatible

This a merger of two commits submitted to AOSP by
the following authors:

ashok.bhat@arm.com, david.butcher@arm.coma
craig.barber@arm.com, kevin.petit@arm.com and
marcus.oakland@arm.com

Due to the very large number of internal conflicts, I
have chosen to cherry-pick this change instead
of letting it merge through AOSP because the merge
conflict resolution would be very hard to review.

Commit messages below:

================================================
AArch64: Make graphics classes 64-bit compatible

Changes in this patch include

[x] Long is used to store native pointers as they can
    be 64-bit.

[x] Some minor changes have been done to conform with
    standard JNI practice (e.g. use of jint instead of int
    in JNI function prototypes)

[x] AssetAtlasManager is not completely 64-bit compatible
    yet. Specifically mAtlasMap member has to be converted
    to hold native pointer using long. Added a TODO to
    AssetAtlasManager.java to indicate the change required.

Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Craig Barber <craig.barber@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>

==================================================================

AArch64: Use long for pointers in graphics/Camera

For storing pointers, long is used in
android/graphics/Camera class, as native
pointers can be 64-bit.

In addition, some minor changes have been done
to conform with standard JNI practice (e.g. use of
jint instead of int in JNI function prototypes)

Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>

===================================================================

Change-Id: Id5793fa0ebc17ee8b1eecf4b3f327977fdccff71
This commit is contained in:
Ashok Bhat
2014-01-20 20:08:01 +00:00
committed by Narayan Kamath
parent 729b12c7a9
commit 36bef0bf30
87 changed files with 2652 additions and 2147 deletions

View File

@@ -219,7 +219,7 @@ public class Matrix {
/**
* @hide
*/
public int native_instance;
public long native_instance;
/**
* Create an identity matrix
@@ -800,83 +800,86 @@ public class Matrix {
}
}
/*package*/ final int ni() {
/*package*/ final long ni() {
return native_instance;
}
private static native int native_create(int native_src_or_zero);
private static native boolean native_isIdentity(int native_object);
private static native boolean native_rectStaysRect(int native_object);
private static native void native_reset(int native_object);
private static native void native_set(int native_object, int other);
private static native void native_setTranslate(int native_object,
private static native long native_create(long native_src_or_zero);
private static native boolean native_isIdentity(long native_object);
private static native boolean native_rectStaysRect(long native_object);
private static native void native_reset(long native_object);
private static native void native_set(long native_object,
long native_other);
private static native void native_setTranslate(long native_object,
float dx, float dy);
private static native void native_setScale(int native_object,
private static native void native_setScale(long native_object,
float sx, float sy, float px, float py);
private static native void native_setScale(int native_object,
private static native void native_setScale(long native_object,
float sx, float sy);
private static native void native_setRotate(int native_object,
private static native void native_setRotate(long native_object,
float degrees, float px, float py);
private static native void native_setRotate(int native_object,
private static native void native_setRotate(long native_object,
float degrees);
private static native void native_setSinCos(int native_object,
private static native void native_setSinCos(long native_object,
float sinValue, float cosValue, float px, float py);
private static native void native_setSinCos(int native_object,
private static native void native_setSinCos(long native_object,
float sinValue, float cosValue);
private static native void native_setSkew(int native_object,
private static native void native_setSkew(long native_object,
float kx, float ky, float px, float py);
private static native void native_setSkew(int native_object,
private static native void native_setSkew(long native_object,
float kx, float ky);
private static native boolean native_setConcat(int native_object,
int a, int b);
private static native boolean native_preTranslate(int native_object,
private static native boolean native_setConcat(long native_object,
long native_a,
long native_b);
private static native boolean native_preTranslate(long native_object,
float dx, float dy);
private static native boolean native_preScale(int native_object,
private static native boolean native_preScale(long native_object,
float sx, float sy, float px, float py);
private static native boolean native_preScale(int native_object,
private static native boolean native_preScale(long native_object,
float sx, float sy);
private static native boolean native_preRotate(int native_object,
private static native boolean native_preRotate(long native_object,
float degrees, float px, float py);
private static native boolean native_preRotate(int native_object,
private static native boolean native_preRotate(long native_object,
float degrees);
private static native boolean native_preSkew(int native_object,
private static native boolean native_preSkew(long native_object,
float kx, float ky, float px, float py);
private static native boolean native_preSkew(int native_object,
private static native boolean native_preSkew(long native_object,
float kx, float ky);
private static native boolean native_preConcat(int native_object,
int other_matrix);
private static native boolean native_postTranslate(int native_object,
private static native boolean native_preConcat(long native_object,
long native_other_matrix);
private static native boolean native_postTranslate(long native_object,
float dx, float dy);
private static native boolean native_postScale(int native_object,
private static native boolean native_postScale(long native_object,
float sx, float sy, float px, float py);
private static native boolean native_postScale(int native_object,
private static native boolean native_postScale(long native_object,
float sx, float sy);
private static native boolean native_postRotate(int native_object,
private static native boolean native_postRotate(long native_object,
float degrees, float px, float py);
private static native boolean native_postRotate(int native_object,
private static native boolean native_postRotate(long native_object,
float degrees);
private static native boolean native_postSkew(int native_object,
private static native boolean native_postSkew(long native_object,
float kx, float ky, float px, float py);
private static native boolean native_postSkew(int native_object,
private static native boolean native_postSkew(long native_object,
float kx, float ky);
private static native boolean native_postConcat(int native_object,
int other_matrix);
private static native boolean native_setRectToRect(int native_object,
private static native boolean native_postConcat(long native_object,
long native_other_matrix);
private static native boolean native_setRectToRect(long native_object,
RectF src, RectF dst, int stf);
private static native boolean native_setPolyToPoly(int native_object,
private static native boolean native_setPolyToPoly(long native_object,
float[] src, int srcIndex, float[] dst, int dstIndex, int pointCount);
private static native boolean native_invert(int native_object, int inverse);
private static native void native_mapPoints(int native_object,
private static native boolean native_invert(long native_object,
long native_inverse);
private static native void native_mapPoints(long native_object,
float[] dst, int dstIndex, float[] src, int srcIndex,
int ptCount, boolean isPts);
private static native boolean native_mapRect(int native_object,
private static native boolean native_mapRect(long native_object,
RectF dst, RectF src);
private static native float native_mapRadius(int native_object,
private static native float native_mapRadius(long native_object,
float radius);
private static native void native_getValues(int native_object,
private static native void native_getValues(long native_object,
float[] values);
private static native void native_setValues(int native_object,
private static native void native_setValues(long native_object,
float[] values);
private static native boolean native_equals(int native_a, int native_b);
private static native void finalizer(int native_instance);
private static native boolean native_equals(long native_a, long native_b);
private static native void finalizer(long native_instance);
}