Owner of a GBM device together with the render-node descriptor it was created from.
More...
#include <src/platform/linux/wayland.h>
|
| int | fd () const |
|
| gbm_device_t ()=default |
| | Construct an empty owner that holds neither a device nor a descriptor.
|
|
| gbm_device_t (const gbm_device_t &)=delete |
| | Copying is disabled: the descriptor and the device have exactly one owner.
|
| gbm_device * | get () const |
| bool | init (const std::string &render_path, const gbm_device_accessors_t &accessors) |
| | Open the render node and create the GBM device on it.
|
| | operator bool () const |
|
gbm_device_t & | operator= (const gbm_device_t &)=delete |
| | Copy assignment is disabled: the descriptor and the device have exactly one owner.
|
|
void | reset () |
| | Destroy the GBM device and close the render-node descriptor.
|
|
| ~gbm_device_t () |
| | Destroy the GBM device and close the render-node descriptor.
|
Owner of a GBM device together with the render-node descriptor it was created from.
gbm_device_destroy() does not close the descriptor passed to gbm_create_device(), so the descriptor has to be tracked and closed here once the device is gone.
◆ fd()
| int wl::gbm_device_t::fd |
( |
| ) |
const |
|
inline |
- Returns
- The render-node descriptor, or -1.
◆ get()
| gbm_device * wl::gbm_device_t::get |
( |
| ) |
const |
|
inline |
- Returns
- The GBM device, or nullptr.
◆ init()
Open the render node and create the GBM device on it.
- Parameters
-
| render_path | Path of the DRM render node. |
| accessors | Functions used to open the node and create the device. |
- Returns
- true when the device is ready, false when nothing is held.
◆ operator bool()
| wl::gbm_device_t::operator bool |
( |
| ) |
const |
|
inlineexplicit |
- Returns
- true when a GBM device is held.
The documentation for this class was generated from the following files: