[go: up one dir, main page]

Struct gbm::Device [] [src]

pub struct Device<'a> { /* fields omitted */ }

An open DRM device

Methods

impl<'a> Device<'a>
[src]

[src]

Open a GBM device from a given IO object taking ownership

[src]

Open a GBM device from a given DRM device

[src]

Open a GBM device from a given unix file descriptor.

The file descriptor passed in is used by the backend to communicate with platform for allocating the memory. For allocations using DRI this would be the file descriptor returned when opening a device such as /dev/dri/card0.

Unsafety

The lifetime of the resulting device depends on the ownership of the file descriptor. If the fd will be controlled by the device a static lifetime is valid, if it does not own the fd the lifetime may not outlive the owning object.

[src]

Get the backend name

[src]

Test if a format is supported for a given set of usage flags

[src]

Allocate a new surface object

[src]

Allocate a buffer object for the given dimensions

[src]

Create a gbm buffer object from a wayland buffer

This function imports a foreign WlBuffer object and creates a new gbm buffer object for it. This enabled using the foreign object with a display API such as KMS.

The gbm bo shares the underlying pixels but its life-time is independent of the foreign object.

[src]

Create a gbm buffer object from an egl buffer

This function imports a foreign EGLImage object and creates a new gbm buffer object for it. This enabled using the foreign object with a display API such as KMS.

The gbm bo shares the underlying pixels but its life-time is independent of the foreign object.

[src]

Create a gbm buffer object from an dma buffer

This function imports a foreign dma buffer from an open file descriptor and creates a new gbm buffer object for it. This enabled using the foreign object with a display API such as KMS.

The gbm bo shares the underlying pixels but its life-time is independent of the foreign object.

Trait Implementations

impl<'a> AsRawFd for Device<'a>
[src]

[src]

Extracts the raw file descriptor. Read more

impl<'a> AsRaw<gbm_device> for Device<'a>
[src]

[src]

Receive a raw pointer representing this type.

impl<'a> FromRaw<gbm_device> for Device<'a>
[src]

[src]

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

impl<'a> Drop for Device<'a>
[src]

[src]

Executes the destructor for this type. Read more