summaryrefslogtreecommitdiff
path: root/opengl
diff options
context:
space:
mode:
author Abdelrahman Daim <adaim@meta.com> 2024-09-25 05:23:10 -0700
committer Abdelrahman Daim <adaim@meta.com> 2024-09-25 23:44:44 +0000
commitab851c755da1652212b99c851571fd0bf2930a6f (patch)
tree51834dee1be55943b024c3dd3e25bd8f43c871b8 /opengl
parent12016e29e968ccacfdef9c0eea07be234e44bcc9 (diff)
Fix crash in presentation time implementation
Summary: Something in Audio Trip triggers this bug when running the display at 90Hz. Setting the display panel to 72Hz makes Audio Trip work, but setting it to 90Hz causes it to crash with an error in native_window_set_buffers_timestamp. The error occurs because the surface's window value is null. A simple fix is to check for this and error out, which solves the problem and allows the app to work despite the error. The true root cause of the issue is unknown. Test: Successful Build on master branch Bug: b/369698627 Change-Id: Ib5ccc8bde07e44cb6ebac5b58d370a23b57ff020 Signed-off-by: Abdelrahman Daim <adaim@meta.com>
Diffstat (limited to 'opengl')
-rw-r--r--opengl/libs/EGL/egl_platform_entries.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/opengl/libs/EGL/egl_platform_entries.cpp b/opengl/libs/EGL/egl_platform_entries.cpp
index a6af713830..8c9518a482 100644
--- a/opengl/libs/EGL/egl_platform_entries.cpp
+++ b/opengl/libs/EGL/egl_platform_entries.cpp
@@ -2111,6 +2111,10 @@ EGLBoolean eglPresentationTimeANDROIDImpl(EGLDisplay dpy, EGLSurface surface,
}
egl_surface_t const* const s = get_surface(surface);
+ if (!s->getNativeWindow()) {
+ setError(EGL_BAD_SURFACE, EGL_FALSE);
+ return EGL_FALSE;
+ }
native_window_set_buffers_timestamp(s->getNativeWindow(), time);
return EGL_TRUE;