From d0d2d28b05c855b58af0701fc378cd03debcc161 Mon Sep 17 00:00:00 2001 From: Nico Burns Date: Wed, 24 Jul 2024 10:17:50 +1200 Subject: [PATCH] Clear the vello Scene immediately after rendering (reduces memory usage) --- packages/blitz/src/renderer.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/blitz/src/renderer.rs b/packages/blitz/src/renderer.rs index 2bad17a4..a73afda1 100644 --- a/packages/blitz/src/renderer.rs +++ b/packages/blitz/src/renderer.rs @@ -153,5 +153,8 @@ where surface_texture.present(); device.device.poll(wgpu::Maintain::Wait); + + // Empty the Vello scene (memory optimisation) + self.scene.reset(); } }