Skip to content

Commit 4809741

Browse files
chirsz-everErichDonGubler
authored andcommitted
[deno] release current texture of surface after present
(cherry picked from denoland/deno#28691)
1 parent 99a6fdd commit 4809741

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

deno_webgpu/surface.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@ impl GPUCanvasContext {
164164

165165
config.device.instance.surface_present(self.surface_id)?;
166166

167+
// next `get_current_texture` call would get a new texture
168+
*self.texture.borrow_mut() = None;
169+
167170
Ok(())
168171
}
169172
}

0 commit comments

Comments
 (0)