libnx v4.9.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
buffer_producer.h
1#pragma once
2#include "types.h"
3#include "binder.h"
4#include "../nvidia/fence.h"
5
6typedef struct {
7 s32 left;
8 s32 top;
9 s32 right;
10 s32 bottom;
11} BqRect;
12
13typedef struct {
14 struct { s64 timestamp; } NX_PACKED;
15 s32 isAutoTimestamp;
16 BqRect crop;
17 s32 scalingMode;
18 u32 transform; // See the NATIVE_WINDOW_TRANSFORM_* enums.
19 u32 stickyTransform;
20 u32 unk;
21 u32 swapInterval;
22 NvMultiFence fence;
24
25typedef struct {
26 u32 width;
27 u32 height;
28 u32 transformHint;
29 u32 numPendingBuffers;
31
32typedef struct {
33 u32 width;
34 u32 height;
35 u32 stride;
36 u32 format;
37 u32 usage;
38 NativeHandle* native_handle;
40
41Result bqRequestBuffer(Binder *b, s32 bufferIdx, BqGraphicBuffer *buf);
42Result bqDequeueBuffer(Binder *b, bool async, u32 width, u32 height, s32 format, u32 usage, s32 *buf, NvMultiFence *fence);
43Result bqDetachBuffer(Binder *b, s32 slot);
44Result bqQueueBuffer(Binder *b, s32 buf, const BqBufferInput *input, BqBufferOutput *output);
45Result bqCancelBuffer(Binder *b, s32 buf, const NvMultiFence *fence);
46Result bqQuery(Binder *b, s32 what, s32* value);
47Result bqConnect(Binder *b, s32 api, bool producerControlledByApp, BqBufferOutput *output);
48Result bqDisconnect(Binder *b, s32 api);
49Result bqSetPreallocatedBuffer(Binder *b, s32 buf, const BqGraphicBuffer *input);
Definition binder.h:8
Definition buffer_producer.h:13
Definition buffer_producer.h:25
Definition buffer_producer.h:32
Definition buffer_producer.h:6
Definition types.h:143
Definition fence.h:6
Various system types.
int64_t s64
64-bit signed integer.
Definition types.h:28
#define NX_PACKED
Packs a struct so that it won't include padding bytes.
Definition types.h:63
u32 Result
Function error code result type.
Definition types.h:44
int32_t s32
32-bit signed integer.
Definition types.h:27
uint32_t u32
32-bit unsigned integer.
Definition types.h:21