From 020c38a8916c063cba36c2c88a69b5e287269d5a Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 1 Feb 2024 15:39:41 -0800 Subject: [PATCH] Avoid excessive blocking of main thread when rendering in direct mode (#7253) Release Notes: - Fixed a bug that caused inconsistent frame rate when scrolling on certain hardware. Co-authored-by: Antonio Scandurra Co-authored-by: Nathan Sobo --- crates/gpui/src/platform/mac/metal_renderer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/gpui/src/platform/mac/metal_renderer.rs b/crates/gpui/src/platform/mac/metal_renderer.rs index 68027ceff6..b3512ad2e9 100644 --- a/crates/gpui/src/platform/mac/metal_renderer.rs +++ b/crates/gpui/src/platform/mac/metal_renderer.rs @@ -314,7 +314,7 @@ impl MetalRenderer { command_buffer.commit(); self.sprite_atlas.clear_textures(AtlasTextureKind::Path); - command_buffer.wait_until_completed(); + command_buffer.wait_until_scheduled(); drawable.present(); }