[Fix] (MG_Backend/DirectGLES): don't glFlush on present

This commit is contained in:
2026-06-10 18:44:59 +08:00
parent 66c36cd945
commit 72b1f50314
+2 -11
View File
@@ -2317,11 +2317,8 @@ namespace MobileGL::MG_Backend::DirectGLES {
}
static Bool PresentStatsEnabled() {
static const Bool enabled = [] {
const char* value = std::getenv("MOBILEGL_GLES_PRESENT_STATS");
return value != nullptr && value[0] != '\0' && std::strcmp(value, "0") != 0;
}();
return enabled;
const char* value = std::getenv("MOBILEGL_GLES_PRESENT_STATS");
return value != nullptr && value[0] != '\0' && std::strcmp(value, "0") != 0;
}
static void DumpDefaultFramebufferStats() {
@@ -2581,13 +2578,7 @@ namespace MobileGL::MG_Backend::DirectGLES {
}
void Present() {
if (g_Display != EGL_NO_DISPLAY && g_Surface != EGL_NO_SURFACE) {
DumpDefaultFramebufferStats();
if (g_GLESFuncs.glFlush) {
g_GLESFuncs.glFlush();
}
g_EGLFuncs.eglSwapBuffers(g_Display, g_Surface);
}
}
void DestroyEGLContext() {