Struct gbm::MappedBufferObject
[−]
[src]
pub struct MappedBufferObject<'a, T: 'static> { /* fields omitted */ }
A read-only mapped buffer object
Methods from Deref<Target = BufferObject<'a, T>>
fn width(&self) -> u32
[src]
Get the width of the buffer object
fn height(&self) -> u32
[src]
Get the height of the buffer object
fn stride(&self) -> u32
[src]
Get the stride of the buffer object
fn format(&self) -> Format
[src]
Get the format of the buffer object
fn handle(&self) -> BufferObjectHandle
[src]
Get the handle of the buffer object
This is stored in the platform generic union BufferObjectHandle
type. However
the format of this handle is platform specific.
fn map(
&'a self,
x: u32,
y: u32,
width: u32,
height: u32
) -> IoResult<MappedBufferObject<'a, T>>
[src]
&'a self,
x: u32,
y: u32,
width: u32,
height: u32
) -> IoResult<MappedBufferObject<'a, T>>
Map a region of a gbm buffer object for cpu access
This function maps a region of a gbm bo for cpu read access.
fn userdata(&self) -> Option<&T>
[src]
Returns a reference to set userdata, if any.
Trait Implementations
impl<'a, T: 'static> Deref for MappedBufferObject<'a, T>
[src]
type Target = BufferObject<'a, T>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
Dereferences the value.
impl<'a, T: 'static> ReadableMappedBufferObject<'a> for MappedBufferObject<'a, T>
[src]
fn stride(&self) -> u32
[src]
Get the stride of the buffer object Read more
fn height(&self) -> u32
[src]
The height of the mapped region for the buffer
fn width(&self) -> u32
[src]
The width of the mapped region for the buffer
fn x(&self) -> u32
[src]
The X (top left origin) starting position of the mapped region for the buffer
fn y(&self) -> u32
[src]
The Y (top left origin) starting position of the mapped region for the buffer
fn buffer(&'a self) -> &'a [u8]
[src]
Access to the underlying image buffer