1
0
Fork 0
forked from wry/wry

render: remove TextureReservations

This commit is contained in:
Julian Orth 2024-03-21 14:48:24 +01:00
parent 300deecc7d
commit ea4a1f027b
20 changed files with 198 additions and 172 deletions

View file

@ -186,7 +186,6 @@ impl GlRenderContext {
Ok(Rc::new(Texture {
ctx: self.clone(),
gl,
resv: Default::default(),
format,
}))
}

View file

@ -27,7 +27,6 @@ impl Image {
Ok(Rc::new(Texture {
ctx: self.ctx.clone(),
gl: GlTexture::import_img(&self.ctx.ctx, &self.gl)?,
resv: Default::default(),
format: self.gl.dmabuf.format,
}))
}

View file

@ -1,7 +1,7 @@
use {
crate::{
format::Format,
gfx_api::{GfxError, GfxTexture, TextureReservations},
gfx_api::{GfxError, GfxTexture},
gfx_apis::gl::{
gl::texture::GlTexture,
renderer::{context::GlRenderContext, framebuffer::Framebuffer},
@ -20,7 +20,6 @@ use {
pub struct Texture {
pub(in crate::gfx_apis::gl) ctx: Rc<GlRenderContext>,
pub(in crate::gfx_apis::gl) gl: GlTexture,
pub(in crate::gfx_apis::gl) resv: TextureReservations,
pub(in crate::gfx_apis::gl) format: &'static Format,
}
@ -79,10 +78,6 @@ impl GfxTexture for Texture {
self.gl.img.as_ref().map(|i| &i.dmabuf)
}
fn reservations(&self) -> &TextureReservations {
&self.resv
}
fn format(&self) -> &'static Format {
self.format
}