Struct gbm::BufferObject [] [src]

pub struct BufferObject<'a, T: 'static> { /* fields omitted */ }

A gbm buffer object

Methods

impl<'a, T: 'static> BufferObject<'a, T>
[src]

[src]

Get the width of the buffer object

[src]

Get the height of the buffer object

[src]

Get the stride of the buffer object

[src]

Get the format of the buffer object

[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.

[src]

Map a region of a gbm buffer object for cpu access

This function maps a region of a gbm bo for cpu read access.

[src]

Map a region of a gbm buffer object for cpu access

This function maps a region of a gbm bo for cpu read/write access.

[src]

Write data into the buffer object

If the buffer object was created with the BufferObjectFlags::Write flag, this function can be used to write data into the buffer object. The data is copied directly into the object and it's the responsibility of the caller to make sure the data represents valid pixel data, according to the width, height, stride and format of the buffer object.

[src]

Sets the userdata of the buffer object.

If previously userdata was set, it is returned.

[src]

Clears the set userdata of the buffer object.

[src]

Returns a reference to set userdata, if any.

[src]

Returns a mutable reference to set userdata, if any.

[src]

Takes ownership of previously set userdata, if any.

This removes the userdata from the buffer object.

Trait Implementations

impl<'a, T: 'static> AsRawFd for BufferObject<'a, T>
[src]

[src]

Extracts the raw file descriptor. Read more

impl<'a, T: 'static> AsRaw<gbm_bo> for BufferObject<'a, T>
[src]

[src]

Receive a raw pointer representing this type.

impl<'a, T: 'static> FromRaw<gbm_bo> for BufferObject<'a, T>
[src]

[src]

Create a new instance of this type from a raw pointer. Read more

impl<'a, T: 'static> Drop for BufferObject<'a, T>
[src]

[src]

Executes the destructor for this type. Read more

impl<'a, T: 'static> DrmBuffer for BufferObject<'a, T>
[src]

[src]

The width and height of the buffer.

[src]

The format of the buffer.

[src]

The pitch of the buffer.

[src]

The GEM handle of the buffer.