1
0
Fork 0
forked from wry/wry

autocommit 2022-01-28 19:46:23 CET

This commit is contained in:
Julian Orth 2022-01-28 19:46:23 +01:00
parent a5573b8a3a
commit b11a36729c
45 changed files with 1646 additions and 2171 deletions

21
src/render/egl/image.rs Normal file
View 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");
}
}
}
}