egl: Rename EGLImages to EGLBuffer
This commit is contained in:
parent
45cd37373a
commit
1f70aa6a08
|
@ -18,7 +18,7 @@ use crate::backend::egl::{
|
||||||
ffi, wrap_egl_call, EGLError, Error,
|
ffi, wrap_egl_call, EGLError, Error,
|
||||||
context::{GlAttributes, PixelFormatRequirements},
|
context::{GlAttributes, PixelFormatRequirements},
|
||||||
native::{EGLNativeDisplay},
|
native::{EGLNativeDisplay},
|
||||||
BufferAccessError, EGLImages, Format,
|
BufferAccessError, EGLBuffer, Format,
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Wrapper around [`ffi::EGLDisplay`](ffi::egl::types::EGLDisplay) to ensure display is only destroyed
|
/// Wrapper around [`ffi::EGLDisplay`](ffi::egl::types::EGLDisplay) to ensure display is only destroyed
|
||||||
|
@ -591,7 +591,7 @@ impl EGLBufferReader {
|
||||||
pub fn egl_buffer_contents(
|
pub fn egl_buffer_contents(
|
||||||
&self,
|
&self,
|
||||||
buffer: &WlBuffer,
|
buffer: &WlBuffer,
|
||||||
) -> ::std::result::Result<EGLImages, BufferAccessError> {
|
) -> ::std::result::Result<EGLBuffer, BufferAccessError> {
|
||||||
let mut format: i32 = 0;
|
let mut format: i32 = 0;
|
||||||
let query = wrap_egl_call(|| unsafe {
|
let query = wrap_egl_call(|| unsafe {
|
||||||
ffi::egl::QueryWaylandBufferWL(
|
ffi::egl::QueryWaylandBufferWL(
|
||||||
|
@ -670,7 +670,7 @@ impl EGLBufferReader {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(EGLImages {
|
Ok(EGLBuffer {
|
||||||
display: self.display.clone(),
|
display: self.display.clone(),
|
||||||
width: width as u32,
|
width: width as u32,
|
||||||
height: height as u32,
|
height: height as u32,
|
||||||
|
|
|
@ -236,7 +236,7 @@ impl Format {
|
||||||
|
|
||||||
/// Images of the EGL-based [`WlBuffer`].
|
/// Images of the EGL-based [`WlBuffer`].
|
||||||
#[cfg(feature = "wayland_frontend")]
|
#[cfg(feature = "wayland_frontend")]
|
||||||
pub struct EGLImages {
|
pub struct EGLBuffer {
|
||||||
display: Arc<EGLDisplayHandle>,
|
display: Arc<EGLDisplayHandle>,
|
||||||
/// Width in pixels
|
/// Width in pixels
|
||||||
pub width: u32,
|
pub width: u32,
|
||||||
|
@ -265,7 +265,7 @@ impl fmt::Debug for EGLImages {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "wayland_frontend")]
|
#[cfg(feature = "wayland_frontend")]
|
||||||
impl EGLImages {
|
impl EGLBuffer {
|
||||||
/// Amount of planes of these `EGLImages`
|
/// Amount of planes of these `EGLImages`
|
||||||
pub fn num_planes(&self) -> usize {
|
pub fn num_planes(&self) -> usize {
|
||||||
self.format.num_planes()
|
self.format.num_planes()
|
||||||
|
@ -327,7 +327,7 @@ impl EGLImages {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "wayland_frontend")]
|
#[cfg(feature = "wayland_frontend")]
|
||||||
impl Drop for EGLImages {
|
impl Drop for EGLBuffer {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
for image in self.images.drain(..) {
|
for image in self.images.drain(..) {
|
||||||
// ignore result on drop
|
// ignore result on drop
|
||||||
|
|
Loading…
Reference in New Issue