mirror of
https://github.com/servo/servo.git
synced 2025-07-31 03:00:29 +01:00
webgpu: Use safe callbacks & try_recv_timeout (#32008)
* Use safe callback in SwapChainPresent and remove present_buffer_maps * Use rust closure in BufferMapAsync * Remove buffer_maps and dead code elimination * scope id passthrough * Inline callbacks * try_recv timeout and halve DEVICE_POLL_INTERVAL
This commit is contained in:
parent
1e186e9251
commit
b6748db69d
2 changed files with 95 additions and 174 deletions
|
@ -382,15 +382,5 @@ impl AsyncWGPUListener for GPUBuffer {
|
|||
None => unreachable!("Failed to get a response for BufferMapAsync"),
|
||||
}
|
||||
*self.map_promise.borrow_mut() = None;
|
||||
if let Err(e) = self
|
||||
.channel
|
||||
.0
|
||||
.send((None, WebGPURequest::BufferMapComplete(self.buffer.0)))
|
||||
{
|
||||
warn!(
|
||||
"Failed to send BufferMapComplete({:?}) ({})",
|
||||
self.buffer.0, e
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue