mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-20 22:41:07 +01:00
wgpu: Put surface config behind arc
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
1 parent
c4aefcbe8a
commit
354fd2e4b2
1 file changed
+2
-2
@@ -308,7 +308,7 @@ pub struct CoreSurface {
|
||||
pub(crate) wgpu_surface: Arc<wgc::instance::Surface>,
|
||||
/// Configured device is needed to know which backend
|
||||
/// code to execute when acquiring a new frame.
|
||||
configured_device: Mutex<Option<Arc<wgc::device::Device>>>,
|
||||
configured_device: Arc<Mutex<Option<Arc<wgc::device::Device>>>>,
|
||||
}
|
||||
|
||||
impl fmt::Debug for CoreSurface {
|
||||
@@ -653,7 +653,7 @@ impl dispatch::InstanceInterface for ContextWgpuCore {
|
||||
Ok(CoreSurface {
|
||||
context: self.clone(),
|
||||
wgpu_surface,
|
||||
configured_device: Mutex::default(),
|
||||
configured_device: Arc::new(Mutex::default()),
|
||||
}
|
||||
.into())
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user