We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
device_unregister_device_lost_closure
1 parent 19d80fe commit 47bfedeCopy full SHA for 47bfede
wgpu-core/src/device/global.rs
@@ -2102,6 +2102,14 @@ impl Global {
2102
}
2103
2104
2105
+ pub fn device_unregister_device_lost_closure(&self, device_id: DeviceId) {
2106
+ let device = self.hub.devices.get(device_id);
2107
+ let closure = device.device_lost_closure.lock().take();
2108
+ if let Some(closure) = closure {
2109
+ closure.call(DeviceLostReason::ReplacedCallback, "".to_string());
2110
+ }
2111
2112
+
2113
pub fn device_destroy(&self, device_id: DeviceId) {
2114
api_log!("Device::destroy {device_id:?}");
2115
0 commit comments