diff options
author | Steven Laver <lavers@google.com> | 2019-11-05 13:42:59 -0800 |
---|---|---|
committer | Steven Laver <lavers@google.com> | 2019-11-09 01:16:30 +0000 |
commit | 7c6cc72e18cc1df5205fd2bc47664e6cc2534ad2 (patch) | |
tree | fc34e4ad6037cf231cccc3b56ccd13e82917520a /opengl/java/android | |
parent | 8f4f93bf3ba75d8e83cb0a8618cb80f226ada5ac (diff) | |
parent | da5e1bd24a9a0ca24e7e49fad9e604409e573376 (diff) |
Merge RP1A.191024.001
Change-Id: I5cda3bba276e99d948b752be87d4599e9f882e0f
Diffstat (limited to 'opengl/java/android')
-rw-r--r-- | opengl/java/android/opengl/GLUtils.java | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/opengl/java/android/opengl/GLUtils.java b/opengl/java/android/opengl/GLUtils.java index ca8d5ac52021..cc46514ae96e 100644 --- a/opengl/java/android/opengl/GLUtils.java +++ b/opengl/java/android/opengl/GLUtils.java @@ -44,7 +44,7 @@ public final class GLUtils { if (bitmap.isRecycled()) { throw new IllegalArgumentException("bitmap is recycled"); } - int result = native_getInternalFormat(bitmap.getNativeInstance()); + int result = native_getInternalFormat(bitmap); if (result < 0) { throw new IllegalArgumentException("Unknown internalformat"); } @@ -66,7 +66,7 @@ public final class GLUtils { if (bitmap.isRecycled()) { throw new IllegalArgumentException("bitmap is recycled"); } - int result = native_getType(bitmap.getNativeInstance()); + int result = native_getType(bitmap); if (result < 0) { throw new IllegalArgumentException("Unknown type"); } @@ -103,8 +103,7 @@ public final class GLUtils { if (bitmap.isRecycled()) { throw new IllegalArgumentException("bitmap is recycled"); } - if (native_texImage2D(target, level, internalformat, bitmap.getNativeInstance(), -1, - border) != 0) { + if (native_texImage2D(target, level, internalformat, bitmap, -1, border) != 0) { throw new IllegalArgumentException("invalid Bitmap format"); } } @@ -130,8 +129,7 @@ public final class GLUtils { if (bitmap.isRecycled()) { throw new IllegalArgumentException("bitmap is recycled"); } - if (native_texImage2D(target, level, internalformat, bitmap.getNativeInstance(), type, - border) != 0) { + if (native_texImage2D(target, level, internalformat, bitmap, type, border) != 0) { throw new IllegalArgumentException("invalid Bitmap format"); } } @@ -153,7 +151,7 @@ public final class GLUtils { if (bitmap.isRecycled()) { throw new IllegalArgumentException("bitmap is recycled"); } - if (native_texImage2D(target, level, -1, bitmap.getNativeInstance(), -1, border) != 0) { + if (native_texImage2D(target, level, -1, bitmap, -1, border) != 0) { throw new IllegalArgumentException("invalid Bitmap format"); } } @@ -189,8 +187,7 @@ public final class GLUtils { throw new IllegalArgumentException("bitmap is recycled"); } int type = getType(bitmap); - if (native_texSubImage2D(target, level, xoffset, yoffset, bitmap.getNativeInstance(), -1, - type) != 0) { + if (native_texSubImage2D(target, level, xoffset, yoffset, bitmap, -1, type) != 0) { throw new IllegalArgumentException("invalid Bitmap format"); } } @@ -214,8 +211,7 @@ public final class GLUtils { if (bitmap.isRecycled()) { throw new IllegalArgumentException("bitmap is recycled"); } - if (native_texSubImage2D(target, level, xoffset, yoffset, bitmap.getNativeInstance(), - format, type) != 0) { + if (native_texSubImage2D(target, level, xoffset, yoffset, bitmap, format, type) != 0) { throw new IllegalArgumentException("invalid Bitmap format"); } } @@ -265,10 +261,10 @@ public final class GLUtils { } } - native private static int native_getInternalFormat(long bitmapHandle); - native private static int native_getType(long bitmapHandle); - native private static int native_texImage2D(int target, int level, int internalformat, - long bitmapHandle, int type, int border); - native private static int native_texSubImage2D(int target, int level, int xoffset, int yoffset, - long bitmapHandle, int format, int type); + private static native int native_getInternalFormat(Bitmap bitmap); + private static native int native_getType(Bitmap bitmap); + private static native int native_texImage2D(int target, int level, int internalformat, + Bitmap bitmap, int type, int border); + private static native int native_texSubImage2D(int target, int level, int xoffset, int yoffset, + Bitmap bitmap, int format, int type); } |