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

Commit 85f519a5 authored by Rachel Lee's avatar Rachel Lee Committed by Automerger Merge Worker
Browse files

Merge "eglSurfaceAttrib EGL_TIMESTAMPS_ANDROID non-window surface fix." into sc-dev am: 5ee58153

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/14848596

Change-Id: Iede81f938f13dacd293ce4cfdc3077c4da020dc5
parents d75def10 5ee58153
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -1453,7 +1453,9 @@ EGLBoolean eglSurfaceAttribImpl(EGLDisplay dpy, EGLSurface surface, EGLint attri


    if (attribute == EGL_TIMESTAMPS_ANDROID) {
    if (attribute == EGL_TIMESTAMPS_ANDROID) {
        if (!s->getNativeWindow()) {
        if (!s->getNativeWindow()) {
            return setError(EGL_BAD_SURFACE, (EGLBoolean)EGL_FALSE);
            // According to the spec, "if surface is not a window surface this has no
            // effect."
            return EGL_TRUE;
        }
        }
        int err = native_window_enable_frame_timestamps(s->getNativeWindow(), value != 0);
        int err = native_window_enable_frame_timestamps(s->getNativeWindow(), value != 0);
        return (err == 0) ? EGL_TRUE : setError(EGL_BAD_SURFACE, (EGLBoolean)EGL_FALSE);
        return (err == 0) ? EGL_TRUE : setError(EGL_BAD_SURFACE, (EGLBoolean)EGL_FALSE);