70 const uint64_t* modifiers,
71 const int modifiers_count);
78 gbm_device*
Get()
const {
return m_device; }
97 gbm_surface*
Get()
const {
return m_surface; }
116 gbm_bo*
Get()
const {
return m_buffer; }
119 gbm_surface* m_surface{
nullptr};
120 gbm_bo* m_buffer{
nullptr};
131 gbm_surface* m_surface{
nullptr};
132 std::queue<std::unique_ptr<CGBMSurfaceBuffer>> m_buffers;
143 gbm_device* m_device{
nullptr};
145 struct CGBMSurfaceDeleter
150 gbm_surface_destroy(p->
Get());
153 std::unique_ptr<CGBMSurface, CGBMSurfaceDeleter> m_surface;
164 struct CGBMDeviceDeleter
169 gbm_device_destroy(p->
Get());
172 std::unique_ptr<CGBMDevice, CGBMDeviceDeleter> m_device;
A wrapper for gbm_surface to allow OOP and RAII.
Definition: GBMUtils.h:84
A wrapper for gbm c classes to allow OOP and RAII.
Definition: GBMUtils.h:27
gbm_bo * Get() const
Get the underlying gbm_bo.
Definition: GBMUtils.h:116
gbm_device * Get() const
Get the underlying gbm_device.
Definition: GBMUtils.h:78
A wrapper for gbm_bo to allow OOP and RAII.
Definition: GBMUtils.h:103
bool CreateDevice(int fd)
Create a gbm device for allocating buffers.
Definition: GBMUtils.cpp:22
Definition: AudioDecoder.h:18
CGBMDevice::CGBMSurface & GetSurface() const
Get the CGBMSurface object.
Definition: GBMUtils.h:140
CGBMSurfaceBuffer & LockFrontBuffer()
Lock the surface's current front buffer.
Definition: GBMUtils.cpp:78
CGBMUtils::CGBMDevice & GetDevice() const
Get the CGBMDevice object.
Definition: GBMUtils.h:161
A wrapper for gbm_device to allow OOP and RAII.
Definition: GBMUtils.h:48
bool CreateSurface(int width, int height, uint32_t format, const uint64_t *modifiers, const int modifiers_count)
Create a gbm surface.
Definition: GBMUtils.cpp:41
gbm_surface * Get() const
Get the underlying gbm_surface.
Definition: GBMUtils.h:97