mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 05:10:03 -04:00
Postpone call to get_current_texture (#3914)
This should help slightly with CPU/GPU parallelism when vsync is on. I also return the time spent on vsync, which can help users figure out how much CPU wall-time was used on non-vsync stuff
This commit is contained in:
@@ -644,7 +644,7 @@ impl WgpuWinitRunning {
|
||||
let clipped_primitives = egui_ctx.tessellate(shapes, pixels_per_point);
|
||||
|
||||
let screenshot_requested = std::mem::take(&mut viewport.screenshot_requested);
|
||||
let screenshot = painter.paint_and_update_textures(
|
||||
let (_vsync_secs, screenshot) = painter.paint_and_update_textures(
|
||||
viewport_id,
|
||||
pixels_per_point,
|
||||
app.clear_color(&egui_ctx.style().visuals),
|
||||
|
||||
Reference in New Issue
Block a user