blade: Update to e142a3a to fix crash (#17510)
Closes https://github.com/zed-industries/zed/issues/17005 Like https://github.com/zed-industries/zed/pull/17319, but based on https://github.com/kvark/blade/pull/144. This should be cherry-picked into preview if possible 🙂 Release Notes: - Linux: Fixed crash when closing windows on Wayland.
This commit is contained in:
parent
832e3e7dd7
commit
f91bf7fca5
3 changed files with 25 additions and 11 deletions
|
@ -336,6 +336,17 @@ impl BladePipelines {
|
|||
}),
|
||||
}
|
||||
}
|
||||
|
||||
fn destroy(&mut self, gpu: &gpu::Context) {
|
||||
gpu.destroy_render_pipeline(&mut self.quads);
|
||||
gpu.destroy_render_pipeline(&mut self.shadows);
|
||||
gpu.destroy_render_pipeline(&mut self.path_rasterization);
|
||||
gpu.destroy_render_pipeline(&mut self.paths);
|
||||
gpu.destroy_render_pipeline(&mut self.underlines);
|
||||
gpu.destroy_render_pipeline(&mut self.mono_sprites);
|
||||
gpu.destroy_render_pipeline(&mut self.poly_sprites);
|
||||
gpu.destroy_render_pipeline(&mut self.surfaces);
|
||||
}
|
||||
}
|
||||
|
||||
pub struct BladeSurfaceConfig {
|
||||
|
@ -438,6 +449,7 @@ impl BladeRenderer {
|
|||
self.wait_for_gpu();
|
||||
self.surface_config.transparent = transparent;
|
||||
let surface_info = self.gpu.resize(self.surface_config);
|
||||
self.pipelines.destroy(&self.gpu);
|
||||
self.pipelines = BladePipelines::new(&self.gpu, surface_info);
|
||||
self.alpha_mode = surface_info.alpha;
|
||||
}
|
||||
|
@ -538,8 +550,10 @@ impl BladeRenderer {
|
|||
pub fn destroy(&mut self) {
|
||||
self.wait_for_gpu();
|
||||
self.atlas.destroy();
|
||||
self.gpu.destroy_sampler(self.atlas_sampler);
|
||||
self.instance_belt.destroy(&self.gpu);
|
||||
self.gpu.destroy_command_encoder(&mut self.command_encoder);
|
||||
self.pipelines.destroy(&self.gpu);
|
||||
}
|
||||
|
||||
pub fn draw(&mut self, scene: &Scene) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue