22 #ifndef FREERDP_CHANNEL_RDPGFX_CLIENT_RDPGFX_H
23 #define FREERDP_CHANNEL_RDPGFX_CLIENT_RDPGFX_H
25 #include <freerdp/api.h>
26 #include <freerdp/types.h>
28 #include <freerdp/codecs.h>
30 #include <freerdp/channels/rdpgfx.h>
31 #include <freerdp/utils/profiler.h>
33 #include <freerdp/cache/persistent.h>
46 typedef UINT (*pcRdpgfxResetGraphics)(RdpgfxClientContext* context,
48 typedef UINT (*pcRdpgfxStartFrame)(RdpgfxClientContext* context,
50 typedef UINT (*pcRdpgfxEndFrame)(RdpgfxClientContext* context,
52 typedef UINT (*pcRdpgfxSurfaceCommand)(RdpgfxClientContext* context,
54 typedef UINT (*pcRdpgfxDeleteEncodingContext)(
55 RdpgfxClientContext* context,
57 typedef UINT (*pcRdpgfxCreateSurface)(RdpgfxClientContext* context,
59 typedef UINT (*pcRdpgfxDeleteSurface)(RdpgfxClientContext* context,
61 typedef UINT (*pcRdpgfxSolidFill)(RdpgfxClientContext* context,
63 typedef UINT (*pcRdpgfxSurfaceToSurface)(RdpgfxClientContext* context,
65 typedef UINT (*pcRdpgfxSurfaceToCache)(RdpgfxClientContext* context,
67 typedef UINT (*pcRdpgfxCacheToSurface)(RdpgfxClientContext* context,
69 typedef UINT (*pcRdpgfxCacheImportOffer)(RdpgfxClientContext* context,
71 typedef UINT (*pcRdpgfxCacheImportReply)(RdpgfxClientContext* context,
73 typedef UINT (*pcRdpgfxEvictCacheEntry)(RdpgfxClientContext* context,
75 typedef UINT (*pcRdpgfxImportCacheEntry)(RdpgfxClientContext* context, UINT16 cacheSlot,
77 typedef UINT (*pcRdpgfxExportCacheEntry)(RdpgfxClientContext* context, UINT16 cacheSlot,
79 typedef UINT (*pcRdpgfxMapSurfaceToOutput)(
81 typedef UINT (*pcRdpgfxMapSurfaceToScaledOutput)(
82 RdpgfxClientContext* context,
84 typedef UINT (*pcRdpgfxMapSurfaceToWindow)(
86 typedef UINT (*pcRdpgfxMapSurfaceToScaledWindow)(
87 RdpgfxClientContext* context,
89 typedef UINT (*pcRdpgfxSetSurfaceData)(RdpgfxClientContext* context, UINT16 surfaceId,
91 typedef void* (*pcRdpgfxGetSurfaceData)(RdpgfxClientContext* context, UINT16 surfaceId);
92 typedef UINT (*pcRdpgfxGetSurfaceIds)(RdpgfxClientContext* context, UINT16** ppSurfaceIds,
94 typedef UINT (*pcRdpgfxSetCacheSlotData)(RdpgfxClientContext* context, UINT16 cacheSlot,
96 typedef void* (*pcRdpgfxGetCacheSlotData)(RdpgfxClientContext* context, UINT16 cacheSlot);
98 typedef UINT (*pcRdpgfxUpdateSurfaces)(RdpgfxClientContext* context);
100 typedef UINT (*pcRdpgfxUpdateWindowFromSurface)(RdpgfxClientContext* context,
101 gdiGfxSurface* surface);
103 typedef UINT (*pcRdpgfxUpdateSurfaceArea)(RdpgfxClientContext* context, UINT16 surfaceId,
106 typedef UINT (*pcRdpgfxOnOpen)(RdpgfxClientContext* context, BOOL* do_caps_advertise,
107 BOOL* do_frame_acks);
108 typedef UINT (*pcRdpgfxOnClose)(RdpgfxClientContext* context);
109 typedef UINT (*pcRdpgfxCapsAdvertise)(RdpgfxClientContext* context,
111 typedef UINT (*pcRdpgfxCapsConfirm)(RdpgfxClientContext* context,
113 typedef UINT (*pcRdpgfxFrameAcknowledge)(RdpgfxClientContext* context,
115 typedef UINT (*pcRdpgfxQoeFrameAcknowledge)(
118 typedef UINT (*pcRdpgfxMapWindowForSurface)(RdpgfxClientContext* context, UINT16 surfaceID,
120 typedef UINT (*pcRdpgfxUnmapWindowForSurface)(RdpgfxClientContext* context, UINT64 windowID);
128 pcRdpgfxResetGraphics ResetGraphics;
129 pcRdpgfxStartFrame StartFrame;
130 pcRdpgfxEndFrame EndFrame;
131 pcRdpgfxSurfaceCommand SurfaceCommand;
132 pcRdpgfxDeleteEncodingContext DeleteEncodingContext;
133 pcRdpgfxCreateSurface CreateSurface;
134 pcRdpgfxDeleteSurface DeleteSurface;
135 pcRdpgfxSolidFill SolidFill;
136 pcRdpgfxSurfaceToSurface SurfaceToSurface;
137 pcRdpgfxSurfaceToCache SurfaceToCache;
138 pcRdpgfxCacheToSurface CacheToSurface;
139 pcRdpgfxCacheImportOffer CacheImportOffer;
140 pcRdpgfxCacheImportReply CacheImportReply;
141 pcRdpgfxImportCacheEntry ImportCacheEntry;
142 pcRdpgfxExportCacheEntry ExportCacheEntry;
143 pcRdpgfxEvictCacheEntry EvictCacheEntry;
144 pcRdpgfxMapSurfaceToOutput MapSurfaceToOutput;
145 pcRdpgfxMapSurfaceToScaledOutput MapSurfaceToScaledOutput;
146 pcRdpgfxMapSurfaceToWindow MapSurfaceToWindow;
147 pcRdpgfxMapSurfaceToScaledWindow MapSurfaceToScaledWindow;
149 pcRdpgfxGetSurfaceIds GetSurfaceIds;
150 pcRdpgfxSetSurfaceData SetSurfaceData;
151 pcRdpgfxGetSurfaceData GetSurfaceData;
152 pcRdpgfxSetCacheSlotData SetCacheSlotData;
153 pcRdpgfxGetCacheSlotData GetCacheSlotData;
156 pcRdpgfxOnOpen OnOpen;
157 pcRdpgfxOnClose OnClose;
158 pcRdpgfxCapsAdvertise CapsAdvertise;
159 pcRdpgfxCapsConfirm CapsConfirm;
160 pcRdpgfxFrameAcknowledge FrameAcknowledge;
161 pcRdpgfxQoeFrameAcknowledge QoeFrameAcknowledge;
164 pcRdpgfxUpdateSurfaces UpdateSurfaces;
165 pcRdpgfxUpdateSurfaceArea UpdateSurfaceArea;
166 pcRdpgfxUpdateWindowFromSurface UpdateWindowFromSurface;
172 pcRdpgfxMapWindowForSurface MapWindowForSurface;
173 pcRdpgfxUnmapWindowForSurface UnmapWindowForSurface;
177 PROFILER_DEFINE(SurfaceProfiler)
180 FREERDP_API
void rdpgfx_client_context_free(RdpgfxClientContext* context);
182 WINPR_ATTR_MALLOC(rdpgfx_client_context_free, 1)
183 FREERDP_API RdpgfxClientContext* rdpgfx_client_context_new(rdpContext* context);