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

Commit 5813eef1 authored by Pablo Ceballos's avatar Pablo Ceballos Committed by android-build-merger
Browse files

Merge \\"Disable support for EGL_ANDROID_get_frame_timestamps\\" into nyc-mr1-dev am: 3e42f7f8

am: 7b1b5650

Change-Id: I20e5c37e48820ab870abb3b341aca4ef53cdb5fc
parents 0bfcf0fa 7b1b5650
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -54,6 +54,8 @@ using namespace android;
// Implementation is incomplete and untested.
#define ENABLE_EGL_KHR_GL_COLORSPACE 0

#define ENABLE_EGL_ANDROID_GET_FRAME_TIMESTAMPS 0

// ----------------------------------------------------------------------------

namespace android {
@@ -84,7 +86,9 @@ extern char const * const gBuiltinExtensionString =
        "EGL_KHR_swap_buffers_with_damage "
        "EGL_ANDROID_create_native_client_buffer "
        "EGL_ANDROID_front_buffer_auto_refresh "
#if ENABLE_EGL_ANDROID_GET_FRAME_TIMESTAMPS
        "EGL_ANDROID_get_frame_timestamps "
#endif
        ;
extern char const * const gExtensionString  =
        "EGL_KHR_image "                        // mandatory
@@ -1212,10 +1216,12 @@ EGLBoolean eglSurfaceAttrib(
            setError(EGL_BAD_SURFACE, EGL_FALSE);
    }

#if ENABLE_EGL_ANDROID_GET_FRAME_TIMESTAMPS
    if (attribute == EGL_TIMESTAMPS_ANDROID) {
        s->enableTimestamps = value;
        return EGL_TRUE;
    }
#endif

    if (s->cnx->egl.eglSurfaceAttrib) {
        return s->cnx->egl.eglSurfaceAttrib(
@@ -2036,6 +2042,7 @@ EGLBoolean eglQueryTimestampSupportedANDROID(EGLDisplay dpy, EGLSurface surface,
    }

    switch (timestamp) {
#if ENABLE_EGL_ANDROID_GET_FRAME_TIMESTAMPS
        case EGL_QUEUE_TIME_ANDROID:
        case EGL_RENDERING_COMPLETE_TIME_ANDROID:
        case EGL_COMPOSITION_START_TIME_ANDROID:
@@ -2043,6 +2050,7 @@ EGLBoolean eglQueryTimestampSupportedANDROID(EGLDisplay dpy, EGLSurface surface,
        case EGL_DISPLAY_RETIRE_TIME_ANDROID:
        case EGL_READS_DONE_TIME_ANDROID:
            return EGL_TRUE;
#endif
        default:
            return EGL_FALSE;
    }