Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
gpui: Prefer Mailbox present mode on Wayland to avoid FIFO stalls (#57077)
Higor Prado980a2942929f
diff --git a/crates/gpui_linux/src/linux/wayland/window.rs b/crates/gpui_linux/src/linux/wayland/window.rsindex 37d0f492d25..73a2bda279f 100644--- a/crates/gpui_linux/src/linux/wayland/window.rs+++ b/crates/gpui_linux/src/linux/wayland/window.rs@@ -37,7 +37,7 @@ use gpui::{WindowDecorations, WindowKind, WindowParams, layer_shell::LayerShellNotSupportedError, px,size,};-use gpui_wgpu::{CompositorGpuHint, WgpuRenderer, WgpuSurfaceConfig};+use gpui_wgpu::{CompositorGpuHint, WgpuRenderer, WgpuSurfaceConfig, wgpu};#[derive(Default)]pub(crate) struct Callbacks {@@ -346,7 +346,8 @@ impl WaylandWindowState {height: DevicePixels(f32::from(options.bounds.size.height) as i32),},transparent: true,- preferred_present_mode: None,+ // Prefer Mailbox to avoid blocking. Falls back to FIFO if Mailbox is unsupported.+ preferred_present_mode: Some(wgpu::PresentMode::Mailbox),};WgpuRenderer::new(gpu_context, &raw_window, config, compositor_gpu)?};