Loading opengl/java/android/opengl/GLUtils.java +18 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,9 @@ public final class GLUtils { if (bitmap == null) { throw new NullPointerException("getInternalFormat can't be used with a null Bitmap"); } if (bitmap.isRecycled()) { throw new IllegalArgumentException("bitmap is recycled"); } int result = native_getInternalFormat(bitmap); if (result < 0) { throw new IllegalArgumentException("Unknown internalformat"); Loading @@ -66,6 +69,9 @@ public final class GLUtils { if (bitmap == null) { throw new NullPointerException("getType can't be used with a null Bitmap"); } if (bitmap.isRecycled()) { throw new IllegalArgumentException("bitmap is recycled"); } int result = native_getType(bitmap); if (result < 0) { throw new IllegalArgumentException("Unknown type"); Loading Loading @@ -100,6 +106,9 @@ public final class GLUtils { if (bitmap == null) { throw new NullPointerException("texImage2D can't be used with a null Bitmap"); } if (bitmap.isRecycled()) { throw new IllegalArgumentException("bitmap is recycled"); } if (native_texImage2D(target, level, internalformat, bitmap, -1, border)!=0) { throw new IllegalArgumentException("invalid Bitmap format"); } Loading @@ -123,6 +132,9 @@ public final class GLUtils { if (bitmap == null) { throw new NullPointerException("texImage2D can't be used with a null Bitmap"); } if (bitmap.isRecycled()) { throw new IllegalArgumentException("bitmap is recycled"); } if (native_texImage2D(target, level, internalformat, bitmap, type, border)!=0) { throw new IllegalArgumentException("invalid Bitmap format"); } Loading Loading @@ -177,6 +189,9 @@ public final class GLUtils { if (bitmap == null) { throw new NullPointerException("texSubImage2D can't be used with a null Bitmap"); } if (bitmap.isRecycled()) { throw new IllegalArgumentException("bitmap is recycled"); } int type = getType(bitmap); if (native_texSubImage2D(target, level, xoffset, yoffset, bitmap, -1, type)!=0) { throw new IllegalArgumentException("invalid Bitmap format"); Loading @@ -199,6 +214,9 @@ public final class GLUtils { if (bitmap == null) { throw new NullPointerException("texSubImage2D can't be used with a null Bitmap"); } if (bitmap.isRecycled()) { throw new IllegalArgumentException("bitmap is recycled"); } if (native_texSubImage2D(target, level, xoffset, yoffset, bitmap, format, type)!=0) { throw new IllegalArgumentException("invalid Bitmap format"); } Loading Loading
opengl/java/android/opengl/GLUtils.java +18 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,9 @@ public final class GLUtils { if (bitmap == null) { throw new NullPointerException("getInternalFormat can't be used with a null Bitmap"); } if (bitmap.isRecycled()) { throw new IllegalArgumentException("bitmap is recycled"); } int result = native_getInternalFormat(bitmap); if (result < 0) { throw new IllegalArgumentException("Unknown internalformat"); Loading @@ -66,6 +69,9 @@ public final class GLUtils { if (bitmap == null) { throw new NullPointerException("getType can't be used with a null Bitmap"); } if (bitmap.isRecycled()) { throw new IllegalArgumentException("bitmap is recycled"); } int result = native_getType(bitmap); if (result < 0) { throw new IllegalArgumentException("Unknown type"); Loading Loading @@ -100,6 +106,9 @@ public final class GLUtils { if (bitmap == null) { throw new NullPointerException("texImage2D can't be used with a null Bitmap"); } if (bitmap.isRecycled()) { throw new IllegalArgumentException("bitmap is recycled"); } if (native_texImage2D(target, level, internalformat, bitmap, -1, border)!=0) { throw new IllegalArgumentException("invalid Bitmap format"); } Loading @@ -123,6 +132,9 @@ public final class GLUtils { if (bitmap == null) { throw new NullPointerException("texImage2D can't be used with a null Bitmap"); } if (bitmap.isRecycled()) { throw new IllegalArgumentException("bitmap is recycled"); } if (native_texImage2D(target, level, internalformat, bitmap, type, border)!=0) { throw new IllegalArgumentException("invalid Bitmap format"); } Loading Loading @@ -177,6 +189,9 @@ public final class GLUtils { if (bitmap == null) { throw new NullPointerException("texSubImage2D can't be used with a null Bitmap"); } if (bitmap.isRecycled()) { throw new IllegalArgumentException("bitmap is recycled"); } int type = getType(bitmap); if (native_texSubImage2D(target, level, xoffset, yoffset, bitmap, -1, type)!=0) { throw new IllegalArgumentException("invalid Bitmap format"); Loading @@ -199,6 +214,9 @@ public final class GLUtils { if (bitmap == null) { throw new NullPointerException("texSubImage2D can't be used with a null Bitmap"); } if (bitmap.isRecycled()) { throw new IllegalArgumentException("bitmap is recycled"); } if (native_texSubImage2D(target, level, xoffset, yoffset, bitmap, format, type)!=0) { throw new IllegalArgumentException("invalid Bitmap format"); } Loading