Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Checkpoint
Antonio Scandurraa237aa816407
diff --git a/crates/gpui3/src/platform.rs b/crates/gpui3/src/platform.rsindex a37ac4fab6a..0b1020e1996 100644--- a/crates/gpui3/src/platform.rs+++ b/crates/gpui3/src/platform.rs@@ -155,13 +155,13 @@ pub trait PlatformWindow {unsafe impl<'a> HasRawWindowHandle for &'a dyn PlatformWindow {fn raw_window_handle(&self) -> raw_window_handle::RawWindowHandle {- self.raw_window_handle()+ (*self).raw_window_handle()}}unsafe impl<'a> HasRawDisplayHandle for &'a dyn PlatformWindow {fn raw_display_handle(&self) -> raw_window_handle::RawDisplayHandle {- self.raw_display_handle()+ (*self).raw_display_handle()}}diff --git a/crates/gpui3/src/renderer.rs b/crates/gpui3/src/renderer.rsindex 5d5f0e5e605..eed29c93c8d 100644--- a/crates/gpui3/src/renderer.rs+++ b/crates/gpui3/src/renderer.rs@@ -1,6 +1,7 @@use crate::{DevicePixels, Scene, Size};use futures::{future::BoxFuture, FutureExt};use raw_window_handle::{HasRawDisplayHandle, HasRawWindowHandle};+use wgpu::Backends;pub struct Renderer {device: wgpu::Device,@@ -21,7 +22,10 @@ impl Renderer {whereW: RenderTarget,{- let instance = wgpu::Instance::new(Default::default());+ let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {+ backends: Backends::METAL,+ ..Default::default()+ });let surface = unsafe { instance.create_surface(window).unwrap() };let width = window.content_device_size().width;let height = window.content_device_size().height;diff --git a/crates/gpui3/src/window.rs b/crates/gpui3/src/window.rsindex 6ea41fbb26a..18bc650cd67 100644--- a/crates/gpui3/src/window.rs+++ b/crates/gpui3/src/window.rs@@ -1,11 +1,7 @@use crate::{- renderer::Renderer, AvailableSpace, MainThreadOnly, Platform, PlatformWindow, Point, Size,- Style, TextStyle, TextStyleRefinement, WindowOptions,-};--use super::{- px, taffy::LayoutId, AppContext, Bounds, Context, EntityId, Handle, Pixels, Reference,- TaffyLayoutEngine,+ px, renderer::Renderer, taffy::LayoutId, AppContext, AvailableSpace, Bounds, Context, EntityId,+ Handle, MainThreadOnly, Pixels, Platform, PlatformWindow, Point, Reference, Size, Style,+ TaffyLayoutEngine, TextStyle, TextStyleRefinement, WindowOptions,};use anyhow::Result;use derive_more::{Deref, DerefMut};