libtransistor
A userland library for the Nintendo Switch
|
Graphics buffer queues data structures and functions. More...
#include <libtransistor/types.h>
#include <libtransistor/display/binder.h>
#include <libtransistor/display/graphic_buffer.h>
#include <libtransistor/display/fence.h>
#include <libtransistor/display/rect.h>
Go to the source code of this file.
Data Structures | |
struct | igbp_t |
IGraphicBufferProducer object. More... | |
struct | compositor_timing_t |
Description here... More... | |
struct | frame_event_history_delta_t |
ToDo: maybe someday actually implement this. More... | |
struct | __attribute__ |
struct | queue_buffer_output_t |
Values received back from queueBuffer. More... | |
Enumerations | |
enum | pixel_format_t { RGBA_8888 = 0x1, RGBX_8888 = 0x2, RGB_888 = 0x3 } |
Various pixel formats. More... | |
enum | disconnect_mode_t { API, ALL_LOCAL } |
Disconnection mode. More... | |
enum | dataspace_t { UNKNOWN = 0x0 } |
Functions | |
result_t | igbp_request_buffer (igbp_t *igbp, uint32_t slot, uint32_t *status, graphic_buffer_t *gb) |
Request a buffer from the IGraphicBufferProducer. More... | |
result_t | igbp_dequeue_buffer (igbp_t *igbp, uint32_t width, uint32_t height, pixel_format_t pixel_format, uint32_t usage, bool get_frame_timestamps, uint32_t *status, uint32_t *slot, fence_t *fence, frame_event_history_delta_t *out_timestamps) |
Dequeue a buffer from the IGraphicBufferProducer. More... | |
result_t | igbp_queue_buffer (igbp_t *igbp, int slot, queue_buffer_input_t *qbi, queue_buffer_output_t *qbo, int *status) |
Queue a buffer to the IGraphicBufferProducer. More... | |
result_t | igbp_cancel_buffer (igbp_t *igbp, int slot, fence_t *fence) |
Cancel a buffer on the IGraphicBufferProducer. More... | |
result_t | igbp_query (igbp_t *igbp, int what, int *status, int *value) |
Query values on the IGraphicBufferProducer. More... | |
result_t | igbp_connect (igbp_t *igbp, int api, bool producer_controlled_by_app, int *status, queue_buffer_output_t *qbo) |
Connect to the IGraphicBufferProducer. More... | |
result_t | igbp_disconnect (igbp_t *igbp, int api, disconnect_mode_t mode, int *status) |
Disconnect from the IGraphicBufferProducer. More... | |
result_t | igbp_set_preallocated_buffer (igbp_t *igbp, int slot, graphic_buffer_t *gb) |
Set a pre-allocated buffer on the IGraphicBufferProducer. More... | |
Graphics buffer queues data structures and functions.
enum disconnect_mode_t |
enum pixel_format_t |
Cancel a buffer on the IGraphicBufferProducer.
igbp | IGraphicBufferProducer to cancel a buffer on |
slot | Slot of the buffer to cancel |
fence | Fence that must be waited on before it's ok to overwrite the buffer |
result_t igbp_connect | ( | igbp_t * | igbp, |
int | api, | ||
bool | producer_controlled_by_app, | ||
int * | status, | ||
queue_buffer_output_t * | qbo | ||
) |
Connect to the IGraphicBufferProducer.
igbp | IGBP to connect to |
api | Description |
producer_controlled_by_app | Description |
status | Description |
qbo | Description |
result_t igbp_dequeue_buffer | ( | igbp_t * | igbp, |
uint32_t | width, | ||
uint32_t | height, | ||
pixel_format_t | pixel_format, | ||
uint32_t | usage, | ||
bool | get_frame_timestamps, | ||
uint32_t * | status, | ||
uint32_t * | slot, | ||
fence_t * | fence, | ||
frame_event_history_delta_t * | out_timestamps | ||
) |
Dequeue a buffer from the IGraphicBufferProducer.
igbp | IGraphicBufferProducer to dequeue buffer from |
width | Width of buffer to dequeue |
height | Height of buffer to dequeue |
pixel_format | Pixel format of buffer to dequeue |
usage | Usage flags of buffer to sequeue |
get_frame_timestamps | Whether or not to get frame timestamps |
status | The returned status from the IGraphicBufferProducer interface |
slot | The slot of the buffer that was dequeued |
fence | The fence to wait on before writing to the dequeued buffer |
out_timestamps | Frame event timestamp history |
result_t igbp_disconnect | ( | igbp_t * | igbp, |
int | api, | ||
disconnect_mode_t | mode, | ||
int * | status | ||
) |
Disconnect from the IGraphicBufferProducer.
igbp | IGBP to disconnect from |
api | Description |
mode | Disconnect mode |
status | Status output |
Query values on the IGraphicBufferProducer.
igbp | IGBP to query |
what | Which value to query |
status | Returned status |
value | Returned value |
result_t igbp_queue_buffer | ( | igbp_t * | igbp, |
int | slot, | ||
queue_buffer_input_t * | qbi, | ||
queue_buffer_output_t * | qbo, | ||
int * | status | ||
) |
Queue a buffer to the IGraphicBufferProducer.
igbp | IGraphicBufferProducer to queue buffer to |
slot | Slot of the buffer to queue |
qbi | Input parameters |
qbo | Output values |
status | Status returned from IGraphicBufferProducer |
result_t igbp_request_buffer | ( | igbp_t * | igbp, |
uint32_t | slot, | ||
uint32_t * | status, | ||
graphic_buffer_t * | gb | ||
) |
Request a buffer from the IGraphicBufferProducer.
igbp | IGraphicBufferProducer to request buffer from |
slot | Slot to request buffer from |
status | The returned status from the IGraphicBufferProducer interface |
gb | The requested GraphicBuffer |
result_t igbp_set_preallocated_buffer | ( | igbp_t * | igbp, |
int | slot, | ||
graphic_buffer_t * | gb | ||
) |
Set a pre-allocated buffer on the IGraphicBufferProducer.
igbp | IGBP to preallocate a buffer on |
slot | Slot to preallocate the buffer in |
gb | Preallocated GraphicBuffer |
This one seems to be Nintendo custom.