Use PowerPreference::HighPerformance by default in iced_wgpu

This commit is contained in:
Dennis Lonoshchuk 2025-02-21 20:04:14 -08:00 • committed by Héctor Ramón Jiménez
parent c12d59db4b
commit b440396869
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -82,13 +82,8 @@ impl Compositor {
.and_then(|window| instance.create_surface(window).ok()); .and_then(|window| instance.create_surface(window).ok());
let adapter_options = wgpu::RequestAdapterOptions { let adapter_options = wgpu::RequestAdapterOptions {
power_preference: wgpu::PowerPreference::from_env().unwrap_or( power_preference: wgpu::PowerPreference::from_env()
if settings.antialiasing.is_none() { .unwrap_or(wgpu::PowerPreference::HighPerformance),
wgpu::PowerPreference::LowPower
} else {
wgpu::PowerPreference::HighPerformance
},
),
compatible_surface: compatible_surface.as_ref(), compatible_surface: compatible_surface.as_ref(),
force_fallback_adapter: false, force_fallback_adapter: false,
}; };