Struct drm::mode::DumbBuf
[−]
[src]
pub struct DumbBuf { /* fields omitted */ }
Methods
impl DumbBuf
[src]
fn create(dev: &Device,
width: u32,
height: u32,
bpp: u32,
flags: DumbBufFlags)
-> Result<DumbBuf>
width: u32,
height: u32,
bpp: u32,
flags: DumbBufFlags)
-> Result<DumbBuf>
Creates, maps and adds a dumb buf. I have not checked if it's wise to do all 3 or let the client deal with it. But it does mean we don't have to deal holding onto the device or the potential error of mapping on the wrong device.
unsafe fn handle(&self) -> u32
Not sure what this used for other than creating/mapping the frame buffer.
fn size(&self) -> (u32, u32)
(width, height) in pixels
fn bpp(&self) -> u32
Bits per pixel
fn pixel(&self) -> u32
Bytes per row
fn as_mut(&mut self) -> &mut [u8]
Access the buffer.
fn fb(&self) -> &Fb
Access the Fb object associated with this.