fix: Try shm-buffer imports, even if we do not have an egl-buffer reader...
This commit is contained in:
parent
e490116d9a
commit
1839756f68
|
@ -66,20 +66,16 @@ impl BufferUtils {
|
||||||
|
|
||||||
#[cfg(feature = "egl")]
|
#[cfg(feature = "egl")]
|
||||||
pub fn load_buffer<T>(&self, buffer: WlBuffer) -> Result<BufferTextures<T>, WlBuffer> {
|
pub fn load_buffer<T>(&self, buffer: WlBuffer) -> Result<BufferTextures<T>, WlBuffer> {
|
||||||
let result = if let Some(reader) = &self.egl_buffer_reader.borrow().as_ref() {
|
let egl_buffer = if let Some(reader) = &self.egl_buffer_reader.borrow().as_ref() {
|
||||||
reader.egl_buffer_contents(&buffer)
|
match reader.egl_buffer_contents(&buffer) {
|
||||||
} else {
|
Ok(egl) => Some(egl),
|
||||||
return Err(buffer);
|
Err(EGLBufferAccessError::NotManaged(_)) => None,
|
||||||
};
|
Err(err) => {
|
||||||
|
error!(self.log, "EGL error"; "err" => format!("{:?}", err));
|
||||||
let egl_buffer = match result {
|
return Err(buffer);
|
||||||
Ok(egl) => Some(egl),
|
}
|
||||||
Err(EGLBufferAccessError::NotManaged(_)) => None,
|
|
||||||
Err(err) => {
|
|
||||||
error!(self.log, "EGL error"; "err" => format!("{:?}", err));
|
|
||||||
return Err(buffer);
|
|
||||||
}
|
}
|
||||||
};
|
} else { None };
|
||||||
|
|
||||||
Ok(BufferTextures {
|
Ok(BufferTextures {
|
||||||
buffer,
|
buffer,
|
||||||
|
|
Loading…
Reference in New Issue