forge
Explore
Log in

Don't you dare go Hollow

Extract Niri::update_shaders()

Browse files at this commit

2511a98e8b070be3b83a466023576f7e4c6e7ddbIvan MolodetskikhParent: a7692d1
src/backend/tty.rsmodified+1 -1
@@ -547,7 +547,7 @@ impl Tty {
547 }547 }
548 drop(config);548 drop(config);
549 549
550- niri.layout.update_shaders();550+ niri.update_shaders();
551 551
552 // Create the dmabuf global.552 // Create the dmabuf global.
553 let primary_formats = renderer.dmabuf_formats();553 let primary_formats = renderer.dmabuf_formats();
src/backend/winit.rsmodified+1 -1
@@ -156,7 +156,7 @@ impl Winit {
156 }156 }
157 drop(config);157 drop(config);
158 158
159- niri.layout.update_shaders();159+ niri.update_shaders();
160 160
161 niri.add_output(self.output.clone(), None, false);161 niri.add_output(self.output.clone(), None, false);
162 }162 }
src/niri.rsmodified+9 -1
@@ -1260,7 +1260,7 @@ impl State {
1260 }1260 }
1261 1261
1262 if shaders_changed {1262 if shaders_changed {
1263- self.niri.layout.update_shaders();1263+ self.niri.update_shaders();
1264 }1264 }
1265 1265
1266 if cursor_inactivity_timeout_changed {1266 if cursor_inactivity_timeout_changed {
@@ -3264,6 +3264,14 @@ impl Niri {
3264 }3264 }
3265 }3265 }
3266 3266
3267+ pub fn update_shaders(&mut self) {
3268+ self.layout.update_shaders();
3269+
3270+ for mapped in self.mapped_layer_surfaces.values_mut() {
3271+ mapped.update_shaders();
3272+ }
3273+ }
3274+
3267 pub fn render<R: NiriRenderer>(3275 pub fn render<R: NiriRenderer>(
3268 &self,3276 &self,
3269 renderer: &mut R,3277 renderer: &mut R,