diff --git a/wgpu/src/backend/direct.rs b/wgpu/src/backend/direct.rs index 22a8d05d4..b17a9f996 100644 --- a/wgpu/src/backend/direct.rs +++ b/wgpu/src/backend/direct.rs @@ -122,7 +122,6 @@ impl Context { self.0.generate_report() } - /*TODO: raw surface #[cfg(any(target_os = "ios", target_os = "macos"))] pub unsafe fn create_surface_from_core_animation_layer( self: &Arc, @@ -131,9 +130,12 @@ impl Context { let id = self.0.instance_create_surface_metal(layer, PhantomData); crate::Surface { context: Arc::clone(self), - id, + id: Surface { + id, + configured_device: Mutex::default(), + }, } - }*/ + } fn handle_error( &self, diff --git a/wgpu/src/lib.rs b/wgpu/src/lib.rs index 32905c6c9..06bf17fae 100644 --- a/wgpu/src/lib.rs +++ b/wgpu/src/lib.rs @@ -1466,7 +1466,6 @@ impl Instance { } } - /*TODO: raw CAL surface /// Creates a surface from `CoreAnimationLayer`. /// /// # Safety @@ -1478,7 +1477,7 @@ impl Instance { layer: *mut std::ffi::c_void, ) -> Surface { self.context.create_surface_from_core_animation_layer(layer) - }*/ + } /// Polls all devices. /// If `force_wait` is true and this is not running on the web,