image-copy: Fix non-deterministic dmabuf format order
This commit is contained in:
parent
4d854ecb94
commit
e7b65b1fc8
1 changed files with 4 additions and 2 deletions
|
|
@ -1,6 +1,8 @@
|
||||||
// SPDX-License-Identifier: GPL-3.0-only
|
// SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
|
||||||
use std::{borrow::Borrow, collections::HashMap, sync::Mutex};
|
use std::{borrow::Borrow, sync::Mutex};
|
||||||
|
|
||||||
|
use indexmap::IndexMap;
|
||||||
|
|
||||||
use smithay::{
|
use smithay::{
|
||||||
backend::{
|
backend::{
|
||||||
|
|
@ -459,7 +461,7 @@ fn constraints_for_renderer(
|
||||||
.dmabuf_render_formats()
|
.dmabuf_render_formats()
|
||||||
.iter()
|
.iter()
|
||||||
.fold(
|
.fold(
|
||||||
HashMap::<Fourcc, Vec<Modifier>>::new(),
|
IndexMap::<Fourcc, Vec<Modifier>>::new(),
|
||||||
|mut map, format| {
|
|mut map, format| {
|
||||||
map.entry(format.code).or_default().push(format.modifier);
|
map.entry(format.code).or_default().push(format.modifier);
|
||||||
map
|
map
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue