(&mut self, scene: vello::Scene)
| 231 | let result = futures::executor::block_on(self.executor.render_vello_scene(&scene, size, &Default::default(), None)); |
| 232 | match result { |
| 233 | Ok(texture) => { |
| 234 | self.overlays_texture = Some(texture.into()); |
| 235 | } |
| 236 | Err(e) => { |
| 237 | self.overlays_texture = None; |
| 238 | tracing::error!("Error rendering overlays: {:?}", e); |
| 239 | } |
| 240 | } |
| 241 | |
| 242 | self.update_bindgroup(); |
| 243 | } |
| 244 | |
| 245 | pub(crate) fn render(&mut self, window: &Window) -> Result<(), RenderError> { |
| 246 | if !self.surface_outdated { |
| 247 | return Ok(()); |
| 248 | } |
| 249 | |
| 250 | // Apply resize once per presented frame. |
| 251 | if self.desired_width > 0 && self.desired_height > 0 && (self.config.width != self.desired_width || self.config.height != self.desired_height) { |
| 252 | self.config.width = self.desired_width; |
| 253 | self.config.height = self.desired_height; |
| 254 | self.surface.configure(&self.executor.context().device, &self.config); |
no test coverage detected