summaryrefslogtreecommitdiff
path: root/opengl/java
diff options
context:
space:
mode:
authorScott Lobdell <slobdell@google.com>2019-04-06 23:51:53 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2019-04-06 23:51:53 +0000
commit57bebe6979fc28797a103c98172938245c3849df (patch)
treeed13cef52388f981763bfd26933750fc717f14aa /opengl/java
parent6edfd63152f24f4a81c1ae8b2a206ebba8085ad4 (diff)
parent6e44ad255823e1b7f2b23386d61af655c19adb49 (diff)
Merge "Merge QP1A.190404.001" into q-keystone-qcom-dev
Diffstat (limited to 'opengl/java')
-rw-r--r--opengl/java/android/opengl/GLUtils.java26
1 files changed, 15 insertions, 11 deletions
diff --git a/opengl/java/android/opengl/GLUtils.java b/opengl/java/android/opengl/GLUtils.java
index d0973359058a..ca8d5ac52021 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);
+ int result = native_getInternalFormat(bitmap.getNativeInstance());
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);
+ int result = native_getType(bitmap.getNativeInstance());
if (result < 0) {
throw new IllegalArgumentException("Unknown type");
}
@@ -103,7 +103,8 @@ public final class GLUtils {
if (bitmap.isRecycled()) {
throw new IllegalArgumentException("bitmap is recycled");
}
- if (native_texImage2D(target, level, internalformat, bitmap, -1, border)!=0) {
+ if (native_texImage2D(target, level, internalformat, bitmap.getNativeInstance(), -1,
+ border) != 0) {
throw new IllegalArgumentException("invalid Bitmap format");
}
}
@@ -129,7 +130,8 @@ public final class GLUtils {
if (bitmap.isRecycled()) {
throw new IllegalArgumentException("bitmap is recycled");
}
- if (native_texImage2D(target, level, internalformat, bitmap, type, border)!=0) {
+ if (native_texImage2D(target, level, internalformat, bitmap.getNativeInstance(), type,
+ border) != 0) {
throw new IllegalArgumentException("invalid Bitmap format");
}
}
@@ -151,7 +153,7 @@ public final class GLUtils {
if (bitmap.isRecycled()) {
throw new IllegalArgumentException("bitmap is recycled");
}
- if (native_texImage2D(target, level, -1, bitmap, -1, border)!=0) {
+ if (native_texImage2D(target, level, -1, bitmap.getNativeInstance(), -1, border) != 0) {
throw new IllegalArgumentException("invalid Bitmap format");
}
}
@@ -187,7 +189,8 @@ public final class GLUtils {
throw new IllegalArgumentException("bitmap is recycled");
}
int type = getType(bitmap);
- if (native_texSubImage2D(target, level, xoffset, yoffset, bitmap, -1, type)!=0) {
+ if (native_texSubImage2D(target, level, xoffset, yoffset, bitmap.getNativeInstance(), -1,
+ type) != 0) {
throw new IllegalArgumentException("invalid Bitmap format");
}
}
@@ -211,7 +214,8 @@ public final class GLUtils {
if (bitmap.isRecycled()) {
throw new IllegalArgumentException("bitmap is recycled");
}
- if (native_texSubImage2D(target, level, xoffset, yoffset, bitmap, format, type)!=0) {
+ if (native_texSubImage2D(target, level, xoffset, yoffset, bitmap.getNativeInstance(),
+ format, type) != 0) {
throw new IllegalArgumentException("invalid Bitmap format");
}
}
@@ -261,10 +265,10 @@ public final class GLUtils {
}
}
- native private static int native_getInternalFormat(Bitmap bitmap);
- native private static int native_getType(Bitmap bitmap);
+ 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,
- Bitmap bitmap, int type, int border);
+ long bitmapHandle, int type, int border);
native private static int native_texSubImage2D(int target, int level, int xoffset, int yoffset,
- Bitmap bitmap, int format, int type);
+ long bitmapHandle, int format, int type);
}