Avoid excessive blocking of main thread when rendering in direct mode (#7253)

Max Brunsfeld , Antonio Scandurra , and Nathan Sobo created

Release Notes:

- Fixed a bug that caused inconsistent frame rate when scrolling on
certain hardware.

Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Nathan Sobo <nathan@zed.dev>

Change summary

crates/gpui/src/platform/mac/metal_renderer.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

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();
     }