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

Commit 3e732435 authored by Andy McFadden's avatar Andy McFadden Committed by Android (Google) Code Review
Browse files

Merge "Add eglPresentationTimeANDROID" into jb-mr2-dev

parents 56bea4d4 0c361e9d
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -1202,6 +1202,22 @@ android_eglCopyBuffers
    return (EGLBoolean) 0;
}

/* EGLBoolean eglPresentationTimeANDROID ( EGLDisplay dpy, EGLSurface sur, EGLnsecsANDROID time ) */
static jboolean
android_eglPresentationTimeANDROID
  (JNIEnv *_env, jobject _this, jobject dpy, jobject sur, jlong time) {
    EGLBoolean _returnValue = (EGLBoolean) 0;
    EGLDisplay dpy_native = (EGLDisplay) fromEGLHandle(_env, egldisplayGetHandleID, dpy);
    EGLSurface sur_native = (EGLSurface) fromEGLHandle(_env, eglsurfaceGetHandleID, sur);

    _returnValue = eglPresentationTimeANDROID(
        (EGLDisplay)dpy_native,
        (EGLSurface)sur_native,
        (EGLnsecsANDROID)time
    );
    return _returnValue;
}

static const char *classPathName = "android/opengl/EGL14";

static JNINativeMethod methods[] = {
@@ -1240,6 +1256,7 @@ static JNINativeMethod methods[] = {
{"eglWaitNative", "(I)Z", (void *) android_eglWaitNative },
{"eglSwapBuffers", "(Landroid/opengl/EGLDisplay;Landroid/opengl/EGLSurface;)Z", (void *) android_eglSwapBuffers },
{"eglCopyBuffers", "(Landroid/opengl/EGLDisplay;Landroid/opengl/EGLSurface;I)Z", (void *) android_eglCopyBuffers },
{"eglPresentationTimeANDROID", "(Landroid/opengl/EGLDisplay;Landroid/opengl/EGLSurface;J)Z", (void *) android_eglPresentationTimeANDROID },
};

int register_android_opengl_jni_EGL14(JNIEnv *_env)
+9 −0
Original line number Diff line number Diff line
@@ -445,4 +445,13 @@ public static final int EGL_CORE_NATIVE_ENGINE = 0x305B;
        int target
    );

    // C function EGLBoolean eglPresentationTimeANDROID ( EGLDisplay dpy, EGLSurface sur, EGLnsecsANDROID time )

    /** @hide -- TODO(fadden) unhide this */
    public static native boolean eglPresentationTimeANDROID(
        EGLDisplay dpy,
        EGLSurface sur,
        long time
    );

}