1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-26 22:53:14 -04:00

Call pre_present_notify before presenting (#8089)

This commit is contained in:
Dimitris Papaioannou
2026-04-12 17:06:12 +03:00
committed by GitHub
parent 86a7f47738
commit 41b64fc6f3
2 changed files with 6 additions and 0 deletions

View File

@@ -411,6 +411,7 @@ impl Painter {
/// and the captures captured screenshot if it was requested.
///
/// If `capture_data` isn't empty, a screenshot will be captured.
#[expect(clippy::too_many_arguments)]
pub fn paint_and_update_textures(
&mut self,
viewport_id: ViewportId,
@@ -419,6 +420,7 @@ impl Painter {
clipped_primitives: &[epaint::ClippedPrimitive],
textures_delta: &epaint::textures::TexturesDelta,
capture_data: Vec<UserData>,
window: &winit::window::Window,
) -> f32 {
profiling::function_scope!();
@@ -654,6 +656,8 @@ impl Painter {
);
}
window.pre_present_notify();
{
profiling::scope!("present");
// wgpu doesn't document where vsync can happen. Maybe here?