Struct gbm::Device [] [src]

pub struct Device<T: AsRawFd + 'static> { /* fields omitted */ }

An open GBM device

Methods

impl Device<FdWrapper>
[src]

[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. Closing the file descriptor before dropping the Device will lead to undefined behavior.

impl<T: AsRawFd + 'static> Device<T>
[src]

[src]

Open a GBM device from a given open DRM device.

The underlying 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.

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

Unsafety

The given EGLImage is a raw pointer. Passing null or an invalid EGLImage will cause undefined behavior.

[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<T: AsRawFd + 'static> AsRawFd for Device<T>
[src]

[src]

Extracts the raw file descriptor. Read more

impl<T: AsRawFd + 'static> AsRaw<gbm_device> for Device<T>
[src]

[src]

Receive a raw pointer representing this type.

impl<T: AsRawFd + 'static> Deref for Device<T>
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.

impl<T: AsRawFd + 'static> DerefMut for Device<T>
[src]

[src]

Mutably dereferences the value.

impl<T: DrmDevice + AsRawFd + 'static> DrmDevice for Device<T>
[src]

[src]

Generates and returns a magic token unique to the current process. Read more

[src]

Tells the DRM device whether we understand or do not understand a particular capability. Read more

[src]

Attempts to acquire the DRM Master lock.

[src]

Attempts to release the DRM Master lock.

impl<T: DrmControlDevice + AsRawFd + 'static> DrmControlDevice for Device<T>
[src]

[src]

See [ResourceHandles::load_from_device] Read more

[src]

See [PlaneResourceHandles::load_from_device] Read more

[src]

See [ResourceInfo::load_from_device] Read more

[src]

Attaches a framebuffer to a CRTC's built-in plane, attaches the CRTC to a connector, and sets the CRTC's mode to output the pixel data. Read more

[src]

Creates a framebuffer from a [Buffer], returning [framebuffer::Info]. Read more

impl<T: AsRawFd + 'static> Drop for Device<T>
[src]

[src]

Executes the destructor for this type. Read more