diff options
| author | 2020-09-09 20:21:10 -0700 | |
|---|---|---|
| committer | 2020-09-09 20:21:10 -0700 | |
| commit | c64112eb974e9aa7638aead998f07a868acfb5a7 (patch) | |
| tree | 503334edcee47bfd9f7a76d987d881992ecae9aa /opengl/java | |
| parent | 104d2f92b3911576c284ddb0adf78148359883d2 (diff) | |
| parent | 14a6871e432e163533a320516ace97bd67d9c3a0 (diff) | |
Merge Android R
Bug: 168057903
Merged-In: Ice3e441cc9c0df8d0a6acc016bb74375e081bd67
Change-Id: I1d85742f594be2007c99841b290e502b6ede624e
Diffstat (limited to 'opengl/java')
| -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); } |