render: store underlying DmaBufs in textures
This commit is contained in:
parent
1ac4f3dc52
commit
3635ae0104
10 changed files with 38 additions and 35 deletions
|
|
@ -3,6 +3,7 @@ use {
|
|||
format::Format,
|
||||
gfx_api::{GfxError, GfxTexture},
|
||||
gfx_apis::gl::{gl::texture::GlTexture, renderer::context::GlRenderContext, RenderError},
|
||||
video::dmabuf::DmaBuf,
|
||||
},
|
||||
std::{
|
||||
any::Any,
|
||||
|
|
@ -58,4 +59,8 @@ impl GfxTexture for Texture {
|
|||
) -> Result<(), GfxError> {
|
||||
Err(RenderError::UnsupportedOperation.into())
|
||||
}
|
||||
|
||||
fn dmabuf(&self) -> Option<&DmaBuf> {
|
||||
self.gl.img.as_ref().map(|i| &i.dmabuf)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue