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:
committed by
GitHub
parent
86a7f47738
commit
41b64fc6f3
@@ -722,6 +722,7 @@ impl WgpuWinitRunning<'_> {
|
||||
&clipped_primitives,
|
||||
&textures_delta,
|
||||
screenshot_commands,
|
||||
window,
|
||||
);
|
||||
|
||||
for action in viewport.actions_requested.drain(..) {
|
||||
@@ -1111,6 +1112,7 @@ fn render_immediate_viewport(
|
||||
&clipped_primitives,
|
||||
&textures_delta,
|
||||
vec![],
|
||||
window,
|
||||
);
|
||||
|
||||
egui_winit.handle_platform_output(window, platform_output);
|
||||
|
||||
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user