-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
egl-wayland: resize windows immediately if surface is current
A recent change modified the behavior of our resize_callback to defer the actual resize until the next eglSwapBuffers, since wl_egl_window_resize may be called by a thread to which the window's surface is not current. Unfortunately, several GUI libraries assume wl_egl_window_resize will take effect immediately and, therefore, will only render one more frame after calling it. With our new behavior, this results in the window contents not matching the new size until something later prompts the application to redraw. As a fix, this change partially restores the old behavior. If resize_callback detects that the window's surface is current to the calling thread (either as EGL_DRAW or EGL_READ), the resize will be performed immediately like it was before. If not, only then will it be deferred to the next eglSwapBuffers. Additionally, in the case where we do defer the resize, we will now do it *after* the actual eglSwapBuffers operation instead of before, since otherwise we would be presenting a newly allocated buffer with undefined contents.
- Loading branch information
Erik Kurzinger
committed
Aug 5, 2022
1 parent
aaf8608
commit 885f0a5
Showing
3 changed files
with
45 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters