Simplify format selection in iced_wgpu
This commit is contained in:
parent
2010977bd2
commit
3d38d0af91
1 changed files with 1 additions and 6 deletions
|
|
@ -60,12 +60,7 @@ impl Compositor {
|
|||
log::info!("Selected: {:#?}", adapter.get_info());
|
||||
|
||||
let format = compatible_surface.as_ref().and_then(|surface| {
|
||||
let formats = surface.get_supported_formats(&adapter);
|
||||
if formats.is_empty() {
|
||||
None
|
||||
} else {
|
||||
Some(formats[0])
|
||||
}
|
||||
surface.get_supported_formats(&adapter).first().copied()
|
||||
})?;
|
||||
|
||||
log::info!("Selected format: {:?}", format);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue