Struct drm::mode::Fb
[−]
[src]
pub struct Fb { /* fields omitted */ }
Fb is the DRM representation of frame buffer.
Either crated by a DRM api, or imported from:
- A GEM handle.
- A PRIME fd.
- A dma_buf fd.
Methods
impl Fb
[src]
fn id(&self) -> Id<Fb>
fn add(dev: &Device,
handle: u32,
width: u32,
height: u32,
bpp: u32,
pitch: u32,
depth: u32)
-> Result<Fb>
handle: u32,
width: u32,
height: u32,
bpp: u32,
pitch: u32,
depth: u32)
-> Result<Fb>
Add a frame buffer using a GEM handle.
- handle: A gem handle
- (width, height): The width and height in pixels.
- bpp: Bit's per pixel (Eg: 32)
- pitch: Offset between the start of each row in bytes. (ie. width + padding)
- depth: Color depth. (Eg: 24)
There is an Api for FbAdd2, which allows for mulit-plane buffers and more useful color format selection.
fn rm(dev: &Device, id: Id<Fb>) -> Result<()>
Remove the frame buffer from DRM.
This will not happen automatically as the Fb
object is not a
real representation of the Frame buffer, but a struct
containing metadata about it.
TODO: It might be a good idea to create a real RAII type for Fb.
Trait Implementations
impl Debug for Fb
[src]
impl Clone for Fb
[src]
fn clone(&self) -> Fb
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Copy for Fb
[src]
impl PartialEq for Fb
[src]
fn eq(&self, __arg_0: &Fb) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Fb) -> bool
This method tests for !=
.
impl Eq for Fb
[src]
impl Hash for Fb
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0
Feeds a slice of this type into the state provided.