Conditionally expose EGL_ANDROID_get_frame_timestamps extension
Expose EGL_ANDROID_get_frame_timestamps extension if service.sf.present_timestamp sysprop is true, and we use ANGLE egl. On cuttlefish we disabled service.sf.present_timestamp, this further disables VK_GOOGLE_display_timing extension. ANGLE's eglSurfaceAttrib(EGL_TIMESTAMPS_ANDROID) requires both EGL_ANDROID_get_frame_timestamps and VK_GOOGLE_display_timing extension to work: https://chromium-review.googlesource.com/c/angle/angle/+/3753396. Android EGL Wrapper's eglSurfaceAttrib() implementation forwards the call to ANGLE. Therefore, we need to make ANGLE and Android EGL Wrapper report consistent results: only expose EGL_ANDROID_get_frame_timestamps in Android EGL Wrapper if service.sf.present_timestamp sysprop is true. That way we won't have Android EGL Wrapper claiming the EGL_ANDROID_get_frame_timestamps extension is supported first, but then the subsequent call of eglSurfaceAttrib(EGL_TIMESTAMPS_ANDROID) to ANGLE fails. Bug: b/269060366 Test: m; cts-tradefed run commandAndExit cts -m CtsDeqpTestCases --abi x86 --skip-preconditions --skip-all-system-status-check --module-arg 'CtsDeqpTestCases:deqp-use-angle:vulkan' --module-arg 'CtsDeqpTestCases:include-filter:dEQP-EGL.functional.get_frame_timestamps*'; Change-Id: Id96d0c749c80ba54aa1e48dba85817efab8b7eea Merged-In: Id96d0c749c80ba54aa1e48dba85817efab8b7eea
Loading
Please register or sign in to comment