Ensure temp buffer is destroyed once normal swapping is in place
This commit is contained in:
parent
610390ed69
commit
351e96ca75
1 changed files with 4 additions and 4 deletions
8
glfw/wl_window.c
vendored
8
glfw/wl_window.c
vendored
|
|
@ -367,16 +367,16 @@ resizeFramebuffer(_GLFWwindow* window) {
|
|||
|
||||
void
|
||||
_glfwWaylandAfterBufferSwap(_GLFWwindow* window) {
|
||||
if (window->wl.temp_buffer_used_during_window_creation) {
|
||||
wl_buffer_destroy(window->wl.temp_buffer_used_during_window_creation);
|
||||
window->wl.temp_buffer_used_during_window_creation = NULL;
|
||||
}
|
||||
if (window->wl.waiting_for_swap_to_commit) {
|
||||
debug("Waiting for swap to commit: swap has happened, window surface committed\n");
|
||||
window->wl.waiting_for_swap_to_commit = false;
|
||||
// this is not really needed, since I think eglSwapBuffers() calls wl_surface_commit()
|
||||
// but lets be safe. See https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/egl/drivers/dri2/platform_wayland.c#L1510
|
||||
wl_surface_commit(window->wl.surface);
|
||||
if (window->wl.temp_buffer_used_during_window_creation) {
|
||||
wl_buffer_destroy(window->wl.temp_buffer_used_during_window_creation);
|
||||
window->wl.temp_buffer_used_during_window_creation = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue