Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 03ebeea

Browse files
authored
Revert "Fix eglPresentationTimeANDROID is no effective (#30182)"
This reverts commit 5502a0a.
1 parent 001f3ef commit 03ebeea

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

shell/platform/android/android_environment_gl.cc

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,11 @@ AndroidEnvironmentGL::AndroidEnvironmentGL()
2020
return;
2121
}
2222

23-
// See if we can use the EGL_ANDROID_presentation_time extension. This
24-
// extension may be available from API18 onward.
25-
// If this extension is available, it will be invoked with the target vsync
26-
// for the current frame before calling eglSwapBuffers. This helps when the
27-
// engine over-stuffs the buffer queue. This can happen when a frame goes over
28-
// budget into the next vsync period, and a subsequent frame is quickly
29-
// submitted in the same vsync period. Dequeuing buffers will then be slow
30-
// until the engine stops submitting frames and lets the GPU catch up.
31-
// However, using this extension means the SurfaceFlinger will only use the
32-
// newest buffer for the current vsync, and the GPU and CPU will stay more
33-
// in sync.
34-
// See https://developer.android.com/games/sdk/frame-pacing for more
35-
// details and diagrams.
3623
auto* extensions = eglQueryString(display_, EGL_EXTENSIONS);
3724
if (strstr(extensions, "EGL_ANDROID_presentation_time")) {
3825
presentation_time_proc_ =
3926
reinterpret_cast<PFNEGLPRESENTATIONTIMEANDROIDPROC>(
40-
eglGetProcAddress("eglPresentationTimeANDROID"));
27+
eglGetProcAddress("sEGL_ANDROID_presentation_time"));
4128
}
4229

4330
valid_ = true;

0 commit comments

Comments
 (0)