Skip to content

Commit 2ad0ccf

Browse files
author
Hidenori Matsubayashi
authored
Fix synchronized frame on Wayland (sony#221)
Currently, the embedder always waits for the next Vsync when flutter calls eglSwapBuffers. - Fixed sony#220
1 parent 5dab228 commit 2ad0ccf

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/flutter/shell/platform/linux_embedded/surface/elinux_egl_surface.cc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,15 @@ bool ELinuxEGLSurface::MakeCurrent() const {
3131
<< get_egl_error_cause();
3232
return false;
3333
}
34+
35+
#if defined(DISPLAY_BACKEND_TYPE_WAYLAND)
36+
// Non-blocking when swappipping buffers on Wayland.
37+
if (eglSwapInterval(display_, 0) != EGL_TRUE) {
38+
ELINUX_LOG(ERROR) << "Failed to eglSwapInterval(Free): "
39+
<< get_egl_error_cause();
40+
}
41+
#endif
42+
3443
return true;
3544
}
3645

0 commit comments

Comments
 (0)