Merge branch 'master' into advanced-text
This commit is contained in:
commit
4bae457c37
73 changed files with 1586 additions and 703 deletions
|
|
@ -66,7 +66,19 @@ impl<Theme> Compositor<Theme> {
|
|||
log::info!("Selected: {:#?}", adapter.get_info());
|
||||
|
||||
let format = compatible_surface.as_ref().and_then(|surface| {
|
||||
surface.get_capabilities(&adapter).formats.first().copied()
|
||||
let capabilities = surface.get_capabilities(&adapter);
|
||||
|
||||
capabilities
|
||||
.formats
|
||||
.iter()
|
||||
.filter(|format| format.describe().srgb)
|
||||
.copied()
|
||||
.next()
|
||||
.or_else(|| {
|
||||
log::warn!("No sRGB format found!");
|
||||
|
||||
capabilities.formats.first().copied()
|
||||
})
|
||||
})?;
|
||||
|
||||
log::info!("Selected format: {:?}", format);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue