Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

Simplify device polling in PendingReadback

Richie McIlroy7c952080021f
diff --git a/crates/rendering/src/frame_pipeline.rs b/crates/rendering/src/frame_pipeline.rs
index f06eecd66..2462e0660 100644
--- a/crates/rendering/src/frame_pipeline.rs
+++ b/crates/rendering/src/frame_pipeline.rs
@@ -41,14 +41,7 @@ impl PendingReadback {
break;
}
Err(oneshot::error::TryRecvError::Empty) => {
- match device.poll(wgpu::PollType::Poll) {
- Ok(maintained) => {
- if maintained.is_queue_empty() {
- break;
- }
- }
- Err(e) => return Err(e.into()),
- }
+ device.poll(wgpu::PollType::Poll)?;
poll_count += 1;
if poll_count.is_multiple_of(3) {
tokio::task::yield_now().await;