render: add support for more formats
This commit is contained in:
parent
9d78231cac
commit
551dafcce8
13 changed files with 348 additions and 491 deletions
|
|
@ -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) if f.shm_supported => *f,
|
||||
Some(f) if f.shm_info.is_some() => *f,
|
||||
_ => return Err(WlShmPoolError::InvalidFormat(req.format)),
|
||||
};
|
||||
if req.height < 0 || req.width < 0 || req.stride < 0 || req.offset < 0 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue