1
0
Fork 0
forked from wry/wry

gfx: add async shm api

This commit is contained in:
Julian Orth 2024-09-07 17:30:32 +02:00
parent c968024905
commit f213372b8e
4 changed files with 108 additions and 7 deletions

View file

@ -1,10 +1,11 @@
use {
crate::{
allocator::Allocator,
cpu_worker::CpuWorker,
format::{Format, XRGB8888},
gfx_api::{
BufferResvUser, GfxApiOpt, GfxContext, GfxError, GfxFormat, GfxFramebuffer, GfxImage,
ResetStatus, ShmGfxTexture,
AsyncShmGfxTexture, BufferResvUser, GfxApiOpt, GfxContext, GfxError, GfxFormat,
GfxFramebuffer, GfxImage, ResetStatus, ShmGfxTexture,
},
gfx_apis::gl::{
egl::{context::EglContext, display::EglDisplay, image::EglImage},
@ -279,6 +280,17 @@ impl GfxContext for GlRenderContext {
.map_err(|e| e.into())
}
fn async_shmem_texture(
self: Rc<Self>,
_format: &'static Format,
_width: i32,
_height: i32,
_stride: i32,
_cpu_worker: &Rc<CpuWorker>,
) -> Result<Rc<dyn AsyncShmGfxTexture>, GfxError> {
todo!()
}
fn allocator(&self) -> Rc<dyn Allocator> {
self.gbm.clone()
}