Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7e86280f authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "EGL 1.5 cleanup eglGetPlatformDisplay"

parents f997bfcc b1d6b733
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -10,3 +10,5 @@ EGLDisplay eglGetPlatformDisplay ( EGLenum platform, EGLAttrib native_display, c
EGLSurface eglCreatePlatformWindowSurface ( EGLDisplay dpy, EGLConfig config, void *native_window, const EGLAttrib *attrib_list )
EGLSurface eglCreatePlatformWindowSurface ( EGLDisplay dpy, EGLConfig config, void *native_window, const EGLAttrib *attrib_list )
EGLSurface eglCreatePlatformPixmapSurface ( EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLAttrib *attrib_list )
EGLSurface eglCreatePlatformPixmapSurface ( EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLAttrib *attrib_list )
EGLBoolean eglWaitSync ( EGLDisplay dpy, EGLSync sync, EGLint flags )
EGLBoolean eglWaitSync ( EGLDisplay dpy, EGLSync sync, EGLint flags )
EGLImage eglCreateImage ( EGLDisplay dpy, EGLContext context, EGLenum target, EGLClientBuffer buffer, const EGLAttrib *attrib_list )
EGLBoolean eglDestroyImage ( EGLDisplay dpy, EGLImage image )
+2 −0
Original line number Original line Diff line number Diff line
@@ -11,3 +11,5 @@ eglQuerySurface check value 1
//STUB function: eglCreatePbufferFromClientBuffer nullAllowed attrib_list sentinel attrib_list EGL_NONE
//STUB function: eglCreatePbufferFromClientBuffer nullAllowed attrib_list sentinel attrib_list EGL_NONE
eglCreateContext sentinel attrib_list EGL_NONE
eglCreateContext sentinel attrib_list EGL_NONE
eglQueryContext check value 1
eglQueryContext check value 1
//unsupported: eglCreatePlatformPixmapSurface nullAllowed attrib_list sentinel attrib_list EGL_NONE
eglCreatePlatformPixmapSurface unsupported
+46 −0
Original line number Original line Diff line number Diff line
/* EGLDisplay eglGetPlatformDisplay ( EGLenum platform, EGLAttrib native_display, const EGLAttrib *attrib_list ) */
static jobject
android_eglGetPlatformDisplay
  (JNIEnv *_env, jobject _this, jint platform, jlong native_display, jlongArray attrib_list_ref, jint offset) {
    jint _exception = 0;
    const char * _exceptionType = NULL;
    const char * _exceptionMessage = NULL;
    EGLDisplay _returnValue = (EGLDisplay) 0;
    EGLAttrib *attrib_list_base = (EGLAttrib *) 0;
    jint _remaining;
    EGLAttrib *attrib_list = (EGLAttrib *) 0;

    if (!attrib_list_ref) {
        _exception = 1;
        _exceptionType = "java/lang/IllegalArgumentException";
        _exceptionMessage = "attrib_list == null";
        goto exit;
    }
    if (offset < 0) {
        _exception = 1;
        _exceptionType = "java/lang/IllegalArgumentException";
        _exceptionMessage = "offset < 0";
        goto exit;
    }
    _remaining = _env->GetArrayLength(attrib_list_ref) - offset;
    attrib_list_base = (EGLAttrib *)
        _env->GetLongArrayElements(attrib_list_ref, (jboolean *)0);
    attrib_list = attrib_list_base + offset;

    _returnValue = eglGetPlatformDisplay(
        (EGLenum)platform,
        (void *)native_display,
        (EGLAttrib *)attrib_list
    );

exit:
    if (attrib_list_base) {
        _env->ReleaseLongArrayElements(attrib_list_ref, (jlong*)attrib_list_base,
            JNI_ABORT);
    }
    if (_exception) {
        jniThrowException(_env, _exceptionType, _exceptionMessage);
    }
    return toEGLHandle(_env, egldisplayClass, egldisplayConstructor, _returnValue);
}
+9 −0
Original line number Original line Diff line number Diff line
    // C function EGLDisplay eglGetPlatformDisplay ( EGLenum platform, EGLAttrib native_display, const EGLAttrib *attrib_list )

    public static native EGLDisplay eglGetPlatformDisplay(
        int platform,
        long native_display,
        long[] attrib_list,
        int offset
    );
+1 −0
Original line number Original line Diff line number Diff line
{"eglGetPlatformDisplay", "(IJ[JI)Landroid/opengl/EGLDisplay;", (void *) android_eglGetPlatformDisplay },