mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Proper GPUDevice cleanup (#32520)
* Make device cleanup right * Use weakref for GPUDevice in globalscope * No need to destroy device on drop * DeviceReason early return * make remove_gpu_device to be the only way to remove device
This commit is contained in:
parent
256c55eb81
commit
bf99cf7f30
6 changed files with 89 additions and 43 deletions
|
@ -1031,13 +1031,6 @@ impl AsyncWGPUListener for GPUDevice {
|
|||
|
||||
impl Drop for GPUDevice {
|
||||
fn drop(&mut self) {
|
||||
if let Err(e) = self
|
||||
.channel
|
||||
.0
|
||||
.send(WebGPURequest::DestroyDevice(self.device.0))
|
||||
{
|
||||
warn!("Failed to send DestroyDevice ({:?}) ({})", self.device.0, e);
|
||||
}
|
||||
if let Err(e) = self
|
||||
.channel
|
||||
.0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue