FreeRDP
Loading...
Searching...
No Matches
shadow_rfx_dirty.h
1
44#ifndef FREERDP_SERVER_SHADOW_RFX_DIRTY_H
45#define FREERDP_SERVER_SHADOW_RFX_DIRTY_H
46
47#include <winpr/wtypes.h>
48
49#include <freerdp/api.h>
50#include <freerdp/server/shadow.h>
51
52#ifdef __cplusplus
53extern "C"
54{
55#endif
56
57 /* Return the list of tiles (RFX_RECT, surface absolute coordinates) below
58 * cmd whose content differs from the last encoded snapshot. rects is
59 * allocated here and freed by the caller. Returns 0 on success and <0 on
60 * allocation failure (the caller should fall back to encoding the whole
61 * frame or fail the frame). */
62 WINPR_ATTR_NODISCARD
63 int shadow_rfx_plan_tiles(rdpShadowEncoder* encoder, const BYTE* pSrcData, UINT32 nSrcStep,
64 const RDPGFX_SURFACE_COMMAND* cmd, UINT16 srcWidth, UINT16 srcHeight,
65 RFX_RECT** rects, UINT16* numRects);
66
67 /* Call after a successful encode: copy the encoded tile pixels into the
68 * snapshot, mark the tiles encoded and accumulate telemetry (one log line
69 * every 120 frames). wireBytes is the size of the encoded RFX message. */
70 void shadow_rfx_commit_tiles(rdpShadowEncoder* encoder, const BYTE* pSrcData, UINT32 nSrcStep,
71 const RFX_RECT* rects, UINT16 numRects, UINT32 wireBytes);
72
73 /* Invalidate the snapshot (release buffers). Called from
74 * shadow_encoder_uninit (reached by reset/free) and when the GFX surface
75 * is reset (ResetGraphics / first frame). */
76 void shadow_rfx_invalidate_snapshot(rdpShadowEncoder* encoder);
77
78#ifdef __cplusplus
79}
80#endif
81
82#endif /* FREERDP_SERVER_SHADOW_RFX_DIRTY_H */
Definition rfx.h:44