Go to the source code of this file.
|
typedef void(* | mir_connection_allocate_buffer_gbm) (MirConnection *connection, int width, int height, unsigned int gbm_pixel_format, unsigned int gbm_bo_flags, MirBufferCallback available_callback, void *available_context) |
| Allocate a MirBuffer via gbm-kms. More...
|
|
typedef void(* | MirConnectionAllocateBufferGbm) (MirConnection *connection, uint32_t width, uint32_t height, uint32_t gbm_pixel_format, uint32_t gbm_bo_flags, MirBufferCallback available_callback, void *available_context) |
| v2 version of mir_connection_allocate_buffer_gbm, with more accurate types. More...
|
|
typedef struct MirExtensionGbmBufferV1 | MirExtensionGbmBufferV1 |
|
typedef MirBuffer *(* | MirConnectionAllocateBufferGbmSync) (MirConnection *connection, uint32_t width, uint32_t height, uint32_t gbm_pixel_format, uint32_t gbm_bo_flags) |
| Allocate a MirBuffer via gbm-kms and wait for the allocation. More...
|
|
typedef bool(* | MirBufferIsGbmImportable) (MirBuffer const *buffer) |
| Check if a MirBuffer is suitable for import via GBM_BO_IMPORT_FD. More...
|
|
typedef int(* | MirBufferGbmFd) (MirBuffer const *buffer) |
| Access the fd a MirBuffer suitable for gbm-kms import. More...
|
|
typedef uint32_t(* | MirBufferGbmStride) (MirBuffer const *buffer) |
| Get the stride of a MirBuffer. More...
|
|
typedef uint32_t(* | MirBufferGbmFormat) (MirBuffer const *buffer) |
| Get the GBM_FORMAT of a MirBuffer. More...
|
|
typedef uint32_t(* | MirBufferGbmFlags) (MirBuffer const *buffer) |
| Get the gbm_bo_flags of a MirBuffer. More...
|
|
typedef unsigned int(* | MirBufferGbmAge) (MirBuffer const *buffer) |
| Get the age of a MirBuffer. More...
|
|
typedef struct MirExtensionGbmBufferV2 | MirExtensionGbmBufferV2 |
|
◆ mir_connection_allocate_buffer_gbm
typedef void(* mir_connection_allocate_buffer_gbm) (MirConnection *connection, int width, int height, unsigned int gbm_pixel_format, unsigned int gbm_bo_flags, MirBufferCallback available_callback, void *available_context) |
Allocate a MirBuffer via gbm-kms.
available in V1 and V2.
The callback will be called when the buffer is available for use. It will be called once when created, and once per every mir_presentation_chain_submit_buffer.
The buffer can be destroyed via mir_buffer_release().
- Note
- Not all formats or flags are available, and allocations may fail. Be sure to check mir_buffer_is_valid() on the returned buffer.
- Parameters
-
[in] | connection | The connection |
[in] | width | Requested buffer width |
[in] | height | Requested buffer height |
[in] | gbm_pixel_format | The pixel format, one of the GBM_FORMATs |
[in] | gbm_bo_flags | The gbm_bo_flags for the buffer. |
[in] | available_callback | The callback called when the buffer is available |
[in] | available_context | The context for the available_callback |
◆ MirBufferGbmAge
typedef unsigned int(* MirBufferGbmAge) (MirBuffer const *buffer) |
Get the age of a MirBuffer.
- Precondition
- The buffer is suitable for GBM_BO_IMPORT_FD
- Parameters
-
- Returns
- The age of the buffer
◆ MirBufferGbmFd
typedef int(* MirBufferGbmFd) (MirBuffer const *buffer) |
Access the fd a MirBuffer suitable for gbm-kms import.
- Precondition
- The buffer is suitable for GBM_BO_IMPORT_FD
- Warning
- The fd is owned by the buffer. Do not close() it.
- Parameters
-
- Returns
- The fd
◆ MirBufferGbmFlags
typedef uint32_t(* MirBufferGbmFlags) (MirBuffer const *buffer) |
Get the gbm_bo_flags of a MirBuffer.
- Precondition
- The buffer is suitable for GBM_BO_IMPORT_FD
- Parameters
-
- Returns
- The gbm_bo_flags of the buffer
◆ MirBufferGbmFormat
typedef uint32_t(* MirBufferGbmFormat) (MirBuffer const *buffer) |
Get the GBM_FORMAT of a MirBuffer.
- Precondition
- The buffer is suitable for GBM_BO_IMPORT_FD
- Parameters
-
- Returns
- The GBM_FORMAT of the buffer
◆ MirBufferGbmStride
typedef uint32_t(* MirBufferGbmStride) (MirBuffer const *buffer) |
Get the stride of a MirBuffer.
- Precondition
- The buffer is suitable for GBM_BO_IMPORT_FD
- Parameters
-
- Returns
- The stride of the buffer
◆ MirBufferIsGbmImportable
typedef bool(* MirBufferIsGbmImportable) (MirBuffer const *buffer) |
Check if a MirBuffer is suitable for import via GBM_BO_IMPORT_FD.
- Parameters
-
- Returns
- True if suitable, false if unsuitable
◆ MirConnectionAllocateBufferGbm
typedef void(* MirConnectionAllocateBufferGbm) (MirConnection *connection, uint32_t width, uint32_t height, uint32_t gbm_pixel_format, uint32_t gbm_bo_flags, MirBufferCallback available_callback, void *available_context) |
v2 version of mir_connection_allocate_buffer_gbm, with more accurate types.
◆ MirConnectionAllocateBufferGbmSync
typedef MirBuffer*(* MirConnectionAllocateBufferGbmSync) (MirConnection *connection, uint32_t width, uint32_t height, uint32_t gbm_pixel_format, uint32_t gbm_bo_flags) |
Allocate a MirBuffer via gbm-kms and wait for the allocation.
available in V2. The buffer can be destroyed via mir_buffer_release().
- Parameters
-
[in] | connection | The connection |
[in] | width | Requested buffer width |
[in] | height | Requested buffer height |
[in] | gbm_pixel_format | The pixel format, one of the GBM_FORMATs |
[in] | gbm_bo_flags | The gbm_bo_flags for the buffer. |
- Returns
- The buffer
◆ MirExtensionGbmBufferV1
◆ MirExtensionGbmBufferV2
Copyright © 2012-2021
Canonical Ltd.
Generated on Fri Feb 26 05:03:10 UTC 2021
This documentation is licensed under the GPL version 2 or 3.