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

@ -19,9 +19,11 @@ use {
crate::{
allocator::{Allocator, AllocatorError},
async_engine::AsyncEngine,
cpu_worker::CpuWorker,
format::Format,
gfx_api::{
GfxContext, GfxError, GfxFormat, GfxFramebuffer, GfxImage, ResetStatus, ShmGfxTexture,
AsyncShmGfxTexture, GfxContext, GfxError, GfxFormat, GfxFramebuffer, GfxImage,
ResetStatus, ShmGfxTexture,
},
gfx_apis::vulkan::{
image::VulkanImageMemory, instance::VulkanInstance, renderer::VulkanRenderer,
@ -278,6 +280,17 @@ impl GfxContext for Context {
Ok(tex as _)
}
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.0.device.gbm.clone()
}