Extract Niri::update_shaders()

This commit is contained in:
Ivan Molodetskikh
2025-01-21 09:40:00 +03:00
parent a7692d10c4
commit 2511a98e8b
3 changed files with 11 additions and 3 deletions
+1 -1
View File
@@ -547,7 +547,7 @@ impl Tty {
}
drop(config);
niri.layout.update_shaders();
niri.update_shaders();
// Create the dmabuf global.
let primary_formats = renderer.dmabuf_formats();
+1 -1
View File
@@ -156,7 +156,7 @@ impl Winit {
}
drop(config);
niri.layout.update_shaders();
niri.update_shaders();
niri.add_output(self.output.clone(), None, false);
}
+9 -1
View File
@@ -1260,7 +1260,7 @@ impl State {
}
if shaders_changed {
self.niri.layout.update_shaders();
self.niri.update_shaders();
}
if cursor_inactivity_timeout_changed {
@@ -3264,6 +3264,14 @@ impl Niri {
}
}
pub fn update_shaders(&mut self) {
self.layout.update_shaders();
for mapped in self.mapped_layer_surfaces.values_mut() {
mapped.update_shaders();
}
}
pub fn render<R: NiriRenderer>(
&self,
renderer: &mut R,