autocommit 2022-01-28 19:46:23 CET
This commit is contained in:
parent
a5573b8a3a
commit
b11a36729c
45 changed files with 1646 additions and 2171 deletions
21
src/render/egl/image.rs
Normal file
21
src/render/egl/image.rs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
use crate::render::egl::display::EglDisplay;
|
||||
use crate::render::egl::sys::{EGLImageKHR, EGL_FALSE};
|
||||
use crate::render::egl::PROCS;
|
||||
use std::rc::Rc;
|
||||
|
||||
pub struct EglImage {
|
||||
pub dpy: Rc<EglDisplay>,
|
||||
pub img: EGLImageKHR,
|
||||
pub width: i32,
|
||||
pub height: i32,
|
||||
}
|
||||
|
||||
impl Drop for EglImage {
|
||||
fn drop(&mut self) {
|
||||
unsafe {
|
||||
if PROCS.eglDestroyImageKHR(self.dpy.dpy, self.img) == EGL_FALSE {
|
||||
log::warn!("`eglDestroyImageKHR` failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue