From 6e8c60ccc1bbfb4da31ef4d1055d938cb2d430af Mon Sep 17 00:00:00 2001 From: Courtney Goeltzenleuchter Date: Fri, 19 Oct 2018 11:19:53 -0600 Subject: Add EGL15: eglCreateImage, eglDestroyImage Also change eglCreatePlatformPixmapSurface to throw an unsupported extension rather than call the native function which will return an error indicating it's unsupported. Bug: 80297325 Test: atest CtsGraphicsTestCases:EGL15Test Change-Id: I94f2d39678515fdacf9b2fccd1c531365930ad1b --- opengl/java/android/opengl/EGL15.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'opengl/java') diff --git a/opengl/java/android/opengl/EGL15.java b/opengl/java/android/opengl/EGL15.java index 9aae6ad0f080..f855fe2591e1 100644 --- a/opengl/java/android/opengl/EGL15.java +++ b/opengl/java/android/opengl/EGL15.java @@ -146,4 +146,22 @@ public class EGL15 { int flags ); + // C function EGLImage eglCreateImage ( EGLDisplay dpy, EGLContext context, EGLenum target, EGLClientBuffer buffer, const EGLAttrib *attrib_list ) + + public static native EGLImage eglCreateImage( + EGLDisplay dpy, + EGLContext context, + int target, + long buffer, + long[] attrib_list, + int offset + ); + + // C function EGLBoolean eglDestroyImage ( EGLDisplay dpy, EGLImage image ) + + public static native boolean eglDestroyImage( + EGLDisplay dpy, + EGLImage image + ); + } -- cgit v1.2.3 From 986992f2cde4dfde5c574e7739b17093047ae5b9 Mon Sep 17 00:00:00 2001 From: Courtney Goeltzenleuchter Date: Wed, 24 Oct 2018 09:10:32 -0600 Subject: Make EGL15 class final Updates from API review feedback. Bug: 118296391 Test: manually inspect code Change-Id: If79f03497e77dfce65909a734bafbb6e08c39155 --- opengl/java/android/opengl/EGL15.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'opengl/java') diff --git a/opengl/java/android/opengl/EGL15.java b/opengl/java/android/opengl/EGL15.java index f855fe2591e1..bd845e7ec1a0 100644 --- a/opengl/java/android/opengl/EGL15.java +++ b/opengl/java/android/opengl/EGL15.java @@ -20,7 +20,9 @@ package android.opengl; * EGL 1.5 * */ -public class EGL15 { +public final class EGL15 { + + private EGL15() {}; public static final int EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT = 0x00000001; public static final int EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT = 0x00000002; -- cgit v1.2.3