mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Ensure GPUDevice cleanup in GlobalScope
This commit is contained in:
parent
37d606621d
commit
785497af63
4 changed files with 52 additions and 3 deletions
|
@ -2954,6 +2954,10 @@ impl GlobalScope {
|
|||
.insert(device.id(), Dom::from_ref(device));
|
||||
}
|
||||
|
||||
pub fn remove_gpu_device(&self, device: WebGPUDevice) {
|
||||
let _ = self.gpu_devices.borrow_mut().remove(&device);
|
||||
}
|
||||
|
||||
pub fn handle_wgpu_msg(&self, device: WebGPUDevice, scope: u64, result: WebGPUOpResult) {
|
||||
let result = match result {
|
||||
WebGPUOpResult::Success => Ok(()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue