MCPcopy Create free account
hub / github.com/GraphiteEditor/Graphite / render_overlays

Method render_overlays

desktop/src/render/state.rs:233–251  ·  view source on GitHub ↗
(&mut self, scene: vello::Scene)

Source from the content-addressed store, hash-verified

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);

Callers 1

renderMethod · 0.45

Calls 5

render_vello_sceneMethod · 0.80
update_bindgroupMethod · 0.80
as_refMethod · 0.45
widthMethod · 0.45
heightMethod · 0.45

Tested by

no test coverage detected