1
0
Fork 0
forked from wry/wry

autocommit 2022-01-28 03:35:35 CET

This commit is contained in:
Julian Orth 2022-01-28 03:35:35 +01:00
parent c340df0d08
commit a5573b8a3a
36 changed files with 3046 additions and 114 deletions

View file

@ -2,6 +2,7 @@ mod types;
use crate::client::Client;
use crate::clientmem::ClientMem;
use crate::format::{formats, map_wayland_format_id};
use crate::ifs::wl_buffer::WlBuffer;
use crate::object::{Interface, Object, ObjectId};
use crate::utils::buffd::MsgParser;
@ -40,7 +41,8 @@ impl WlShmPool {
fn create_buffer(&self, parser: MsgParser<'_, '_>) -> Result<(), CreateBufferError> {
let req: CreateBuffer = self.client.parse(self, parser)?;
let format = match self.client.state.formats.get(&req.format) {
let drm_format = map_wayland_format_id(req.format);
let format = match formats().get(&drm_format) {
Some(f) => *f,
_ => return Err(CreateBufferError::InvalidFormat(req.format)),
};