mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-08 20:01:30 +11:00
[frame_stats] Use wgpu::PresentMode::AutoVsync/AutoNoVsync for VSync mode
The Auto* modes should have wider compatibility as they implement fallback behavior based on what the platform supports. This also means that on web "vsync off" will likely be incorrect.
This commit is contained in:
parent
02a222f435
commit
8bd1bdfaa8
|
@ -158,9 +158,9 @@ fn run(
|
|||
render_cx.set_present_mode(
|
||||
&mut render_state.surface,
|
||||
if vsync_on {
|
||||
wgpu::PresentMode::Fifo
|
||||
wgpu::PresentMode::AutoVsync
|
||||
} else {
|
||||
wgpu::PresentMode::Immediate
|
||||
wgpu::PresentMode::AutoNoVsync
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ impl RenderContext {
|
|||
format,
|
||||
width,
|
||||
height,
|
||||
present_mode: wgpu::PresentMode::Fifo,
|
||||
present_mode: wgpu::PresentMode::AutoVsync,
|
||||
alpha_mode: wgpu::CompositeAlphaMode::Auto,
|
||||
view_formats: vec![],
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue