|
Ream v0.1.0-1
C++ graphics library for Linux
|
Wrapper around a native GBM buffer object (gbm_bo). More...
#include <RGBMBo.h>
Inheritance diagram for RGBMBo:Public Member Functions | |
| ~RGBMBo () noexcept | |
| Destroys the underlying gbm_bo if this object owns it. | |
| RDevice * | allocator () const noexcept |
| Returns the allocator device used to create this buffer. | |
| bool | hasModifier () const noexcept |
| Checks whether the buffer was created with an explicit modifier. | |
| RModifier | modifier () const noexcept |
| Returns the DRM format modifier of the buffer. | |
| RFormat | format () const noexcept |
| Returns the DRM pixel format of the buffer. | |
| SkISize | size () const noexcept |
| Returns the width and height of the buffer in pixels. | |
| int | planeCount () const noexcept |
| Returns the number of planes in the buffer. | |
| union gbm_bo_handle | planeHandle (int planeIndex) const noexcept |
| Returns the GEM flink handle for a specific plane. | |
| UInt32 | planeStride (int planeIndex) const noexcept |
| Returns the stride (bytes per row) for a specific plane. | |
| UInt32 | planeOffset (int planeIndex) const noexcept |
| Returns the byte offset of a specific plane within the buffer. | |
| CZSpFd | planeFd (int planeIndex) const noexcept |
| Exports a DMA-BUF file descriptor for a specific plane. | |
| bool | supportsMapRead () const noexcept |
| Checks whether the buffer supports memory mapping for read access. | |
| bool | supportsMapWrite () const noexcept |
| Checks whether the buffer supports memory mapping for write access. | |
| gbm_bo * | bo () const noexcept |
Returns the raw gbm_bo handle. | |
| std::shared_ptr< RCore > | core () const noexcept |
| Returns the internal shared reference to the core instance. | |
Public Member Functions inherited from RObject | |
| RObject ()=default | |
| Constructs a default RObject. | |
Static Public Member Functions | |
| static std::shared_ptr< RGBMBo > | Make (SkISize size, const RDRMFormat &format, RDevice *allocator=nullptr) noexcept |
| Creates a GBM buffer object. | |
Wrapper around a native GBM buffer object (gbm_bo).
This class encapsulates a GBM buffer object, providing safe access to its properties and DMA-BUF export information. It manages the lifetime of the gbm_bo handle and related resources.
Use Make() to create an instance. The buffer object is created either with or without modifiers, depending on platform support and requested format.
|
noexcept |
Destroys the underlying gbm_bo if this object owns it.
|
staticnoexcept |
Creates a GBM buffer object.
Allocates a new gbm_bo with the specified size and format.
If no allocator is provided, the default device from RCore::mainDevice() is used.
| size | The width and height of the buffer. |
| format | The DRM pixel format and modifiers. |
| allocator | The device to use for allocation (optional). |
|
inlinenoexcept |
Returns the allocator device used to create this buffer.
|
inlinenoexcept |
Checks whether the buffer was created with an explicit modifier.
If true, the buffer was created using gbm_bo_create_with_modifiers and has a valid modifier. If false, it was created using gbm_bo_create, and the modifier may be DRM_FORMAT_MOD_INVALID or DRM_FORMAT_MOD_LINEAR.
|
noexcept |
Returns the DRM format modifier of the buffer.
|
noexcept |
Returns the DRM pixel format of the buffer.
|
noexcept |
Returns the width and height of the buffer in pixels.
|
noexcept |
Returns the number of planes in the buffer.
|
noexcept |
Returns the GEM flink handle for a specific plane.
| planeIndex | Index of the plane (0-based). |
|
noexcept |
Returns the stride (bytes per row) for a specific plane.
| planeIndex | Index of the plane (0-based). |
|
noexcept |
Returns the byte offset of a specific plane within the buffer.
| planeIndex | Index of the plane (0-based). |
|
noexcept |
Exports a DMA-BUF file descriptor for a specific plane.
| planeIndex | Index of the plane (0-based). |
|
noexcept |
Checks whether the buffer supports memory mapping for read access.
gbm_bo_map can be used for reading, false otherwise.
|
noexcept |
Checks whether the buffer supports memory mapping for write access.
gbm_bo_map can be used for writing, false otherwise.
|
inlinenoexcept |
Returns the raw gbm_bo handle.