summaryrefslogtreecommitdiffstats
path: root/graphics/java
diff options
context:
space:
mode:
authorAshok Bhat <ashok.bhat@arm.com>2014-01-08 14:32:49 +0000
committerDavid Butcher <david.butcher@arm.com>2014-01-15 14:23:22 +0000
commitb091d47a2e31a30581aa210419ff09bcc8715cdf (patch)
tree86f427d13bd98d4cf8cd291a1b28d9a078194096 /graphics/java
parentdcaf5593ddbfe8e1cacaf07813b1e827ba4dba8c (diff)
downloadframeworks_base-b091d47a2e31a30581aa210419ff09bcc8715cdf.zip
frameworks_base-b091d47a2e31a30581aa210419ff09bcc8715cdf.tar.gz
frameworks_base-b091d47a2e31a30581aa210419ff09bcc8715cdf.tar.bz2
AArch64: Use long for pointers in BitmapRegionDecoder
For storing pointers, long is used in BitmapRegionDecoder 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) In addition, Graphics.cpp has been changed to work with modified BitmapRegionDecoder. Change-Id: Id54087dd3bfb29577e8b762e70946793369dc701 Signed-off-by: Ashok Bhat <ashok.bhat@arm.com> Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
Diffstat (limited to 'graphics/java')
-rw-r--r--graphics/java/android/graphics/BitmapRegionDecoder.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/graphics/java/android/graphics/BitmapRegionDecoder.java b/graphics/java/android/graphics/BitmapRegionDecoder.java
index 3a99977..e689b08 100644
--- a/graphics/java/android/graphics/BitmapRegionDecoder.java
+++ b/graphics/java/android/graphics/BitmapRegionDecoder.java
@@ -33,7 +33,7 @@ import java.io.InputStream;
*
*/
public final class BitmapRegionDecoder {
- private int mNativeBitmapRegionDecoder;
+ private long mNativeBitmapRegionDecoder;
private boolean mRecycled;
// ensures that the native decoder object exists and that only one decode can
// occur at a time.
@@ -114,7 +114,7 @@ public final class BitmapRegionDecoder {
boolean isShareable) throws IOException {
if (is instanceof AssetManager.AssetInputStream) {
return nativeNewInstance(
- ((AssetManager.AssetInputStream) is).getAssetInt(),
+ ((AssetManager.AssetInputStream) is).getNativeAsset(),
isShareable);
} else {
// pass some temp storage down to the native code. 1024 is made up,
@@ -165,7 +165,7 @@ public final class BitmapRegionDecoder {
This can be called from JNI code.
*/
- private BitmapRegionDecoder(int decoder) {
+ private BitmapRegionDecoder(long decoder) {
mNativeBitmapRegionDecoder = decoder;
mRecycled = false;
}
@@ -254,12 +254,12 @@ public final class BitmapRegionDecoder {
}
}
- private static native Bitmap nativeDecodeRegion(int lbm,
+ private static native Bitmap nativeDecodeRegion(long lbm,
int start_x, int start_y, int width, int height,
BitmapFactory.Options options);
- private static native int nativeGetWidth(int lbm);
- private static native int nativeGetHeight(int lbm);
- private static native void nativeClean(int lbm);
+ private static native int nativeGetWidth(long lbm);
+ private static native int nativeGetHeight(long lbm);
+ private static native void nativeClean(long lbm);
private static native BitmapRegionDecoder nativeNewInstance(
byte[] data, int offset, int length, boolean isShareable);
@@ -268,5 +268,5 @@ public final class BitmapRegionDecoder {
private static native BitmapRegionDecoder nativeNewInstance(
InputStream is, byte[] storage, boolean isShareable);
private static native BitmapRegionDecoder nativeNewInstance(
- int asset, boolean isShareable);
+ long asset, boolean isShareable);
}