1
0
Fork 0
forked from wry/wry

wayland: add support for NV12 format

This commit is contained in:
Julian Orth 2022-05-28 22:04:00 +02:00
parent 95327685c1
commit 97e8d487a0
15 changed files with 182 additions and 119 deletions

View file

@ -45,7 +45,7 @@ impl WlShmPool {
let req: CreateBuffer = self.client.parse(self, parser)?;
let drm_format = map_wayland_format_id(req.format);
let format = match formats().get(&drm_format) {
Some(f) => *f,
Some(f) if f.shm_supported => *f,
_ => return Err(WlShmPoolError::InvalidFormat(req.format)),
};
if req.height < 0 || req.width < 0 || req.stride < 0 || req.offset < 0 {