rdprail.h
/* rdprail.h */ #ifndef WLR_RENDER_ALLOCATOR_RDPRAIL_H #define WLR_RENDER_ALLOCATOR_RDPRAIL_H #include <stdint.h> #include <wlr/render/allocator.h> #include <wlr/types/wlr_buffer.h> // Placeholder for RDP-specific PDU structures typedef struct { uint32_t poolId; } GFXREDIR_OPEN_POOL_PDU; typedef struct { uint32_t poolId; uint32_t bufferId; int width; int height; int format; } GFXREDIR_CREATE_BUFFER_PDU; // Full definition of the context structure struct _GfxRedirServerContext { int (*OpenPool)(struct _GfxRedirServerContext *ctx, GFXREDIR_OPEN_POOL_PDU *open_pool); int (*CreateBuffer)(struct _GfxRedirServerContext *ctx, GFXREDIR_CREATE_BUFFER_PDU *create_buffer); }; typedef struct _GfxRedirServerContext GfxRedirServerContext; struct wlr_rdp_allocator { struct wlr_allocator base; GfxRedirServerContext *redir_ctx; }; struct wlr_rdp_buffer { struct wlr_buffer buffer; uint32_t pool_id; uint32_t buffer_id; void *rdp_memory; size_t rdp_memory_size; int width; int height; }; // Function to get shared memory (you'll need to implement this) void* rdp_get_shared_memory(uint32_t pool_id, size_t *size); // Function to create the RDP allocator struct wlr_allocator *wlr_rdp_allocator_create(GfxRedirServerContext *redir_ctx); #endif // WLR_RENDER_ALLOCATOR_RDPRAIL_H
Leave a Comment