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,11 +1,12 @@
use {
crate::{
allocator::{Allocator, AllocatorError, BufferObject, BufferUsage},
cpu_worker::CpuWorker,
format::{Format, ARGB8888, XRGB8888},
gfx_api::{
CopyTexture, FillRect, FramebufferRect, GfxApiOpt, GfxContext, GfxError, GfxFormat,
GfxFramebuffer, GfxImage, GfxTexture, GfxWriteModifier, ResetStatus, ShmGfxTexture,
SyncFile,
AsyncShmGfxTexture, CopyTexture, FillRect, FramebufferRect, GfxApiOpt, GfxContext,
GfxError, GfxFormat, GfxFramebuffer, GfxImage, GfxTexture, GfxWriteModifier,
ResetStatus, ShmGfxTexture, SyncFile,
},
rect::Rect,
theme::Color,
@ -133,6 +134,17 @@ impl GfxContext for TestGfxCtx {
})))
}
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.allocator.clone()
}