Skip to content

Commit 3a3ec85

Browse files
committedMar 16, 2016
Unified RDPGFX_RECT16 and RECTANGLE_16
1 parent 0c99d6a commit 3a3ec85

File tree

9 files changed

+22
-31
lines changed

9 files changed

+22
-31
lines changed
 

‎channels/rdpgfx/client/rdpgfx_codec.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
static UINT rdpgfx_read_h264_metablock(RDPGFX_PLUGIN* gfx, wStream* s, RDPGFX_H264_METABLOCK* meta)
4242
{
4343
UINT32 index;
44-
RDPGFX_RECT16* regionRect;
44+
RECTANGLE_16* regionRect;
4545
RDPGFX_H264_QUANT_QUALITY* quantQualityVal;
4646
UINT error = ERROR_INVALID_DATA;
4747

@@ -62,7 +62,7 @@ static UINT rdpgfx_read_h264_metablock(RDPGFX_PLUGIN* gfx, wStream* s, RDPGFX_H2
6262
goto error_out;
6363
}
6464

65-
meta->regionRects = (RDPGFX_RECT16*) malloc(meta->numRegionRects * sizeof(RDPGFX_RECT16));
65+
meta->regionRects = (RECTANGLE_16*) malloc(meta->numRegionRects * sizeof(RECTANGLE_16));
6666

6767
if (!meta->regionRects)
6868
{

‎channels/rdpgfx/client/rdpgfx_common.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ UINT rdpgfx_write_point16(wStream* s, RDPGFX_POINT16* point16)
161161
*
162162
* @return 0 on success, otherwise a Win32 error code
163163
*/
164-
UINT rdpgfx_read_rect16(wStream* s, RDPGFX_RECT16* rect16)
164+
UINT rdpgfx_read_rect16(wStream* s, RECTANGLE_16* rect16)
165165
{
166166
if (Stream_GetRemainingLength(s) < 8)
167167
{
@@ -182,7 +182,7 @@ UINT rdpgfx_read_rect16(wStream* s, RDPGFX_RECT16* rect16)
182182
*
183183
* @return 0 on success, otherwise a Win32 error code
184184
*/
185-
UINT rdpgfx_write_rect16(wStream* s, RDPGFX_RECT16* rect16)
185+
UINT rdpgfx_write_rect16(wStream* s, RECTANGLE_16* rect16)
186186
{
187187
Stream_Write_UINT16(s, rect16->left); /* left (2 bytes) */
188188
Stream_Write_UINT16(s, rect16->top); /* top (2 bytes) */

‎channels/rdpgfx/client/rdpgfx_common.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ UINT rdpgfx_write_header(wStream* s, RDPGFX_HEADER* header);
3636
UINT rdpgfx_read_point16(wStream* s, RDPGFX_POINT16* pt16);
3737
UINT rdpgfx_write_point16(wStream* s, RDPGFX_POINT16* point16);
3838

39-
UINT rdpgfx_read_rect16(wStream* s, RDPGFX_RECT16* rect16);
40-
UINT rdpgfx_write_rect16(wStream* s, RDPGFX_RECT16* rect16);
39+
UINT rdpgfx_read_rect16(wStream* s, RECTANGLE_16* rect16);
40+
UINT rdpgfx_write_rect16(wStream* s, RECTANGLE_16* rect16);
4141

4242
UINT rdpgfx_read_color32(wStream* s, RDPGFX_COLOR32* color32);
4343
UINT rdpgfx_write_color32(wStream* s, RDPGFX_COLOR32* color32);

‎channels/rdpgfx/client/rdpgfx_main.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ static UINT rdpgfx_recv_delete_encoding_context_pdu(RDPGFX_CHANNEL_CALLBACK* cal
688688
UINT rdpgfx_recv_solid_fill_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
689689
{
690690
UINT16 index;
691-
RDPGFX_RECT16* fillRect;
691+
RECTANGLE_16* fillRect;
692692
RDPGFX_SOLID_FILL_PDU pdu;
693693
RDPGFX_PLUGIN* gfx = (RDPGFX_PLUGIN*) callback->plugin;
694694
RdpgfxClientContext* context = (RdpgfxClientContext*) gfx->iface.pInterface;
@@ -714,7 +714,7 @@ UINT rdpgfx_recv_solid_fill_pdu(RDPGFX_CHANNEL_CALLBACK* callback, wStream* s)
714714
return ERROR_INVALID_DATA;
715715
}
716716

717-
pdu.fillRects = (RDPGFX_RECT16*) calloc(pdu.fillRectCount, sizeof(RDPGFX_RECT16));
717+
pdu.fillRects = (RECTANGLE_16*) calloc(pdu.fillRectCount, sizeof(RECTANGLE_16));
718718

719719
if (!pdu.fillRects)
720720
{

‎client/X11/xf_gfx.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ UINT xf_SolidFill(RdpgfxClientContext* context, RDPGFX_SOLID_FILL_PDU* solidFill
833833
UINT32 color;
834834
BYTE a, r, g, b;
835835
int nWidth, nHeight;
836-
RDPGFX_RECT16* rect;
836+
RECTANGLE_16* rect;
837837
xfGfxSurface* surface;
838838
RECTANGLE_16 invalidRect;
839839
xfContext* xfc = (xfContext*) context->custom;
@@ -884,7 +884,7 @@ UINT xf_SurfaceToSurface(RdpgfxClientContext* context, RDPGFX_SURFACE_TO_SURFACE
884884
UINT16 index;
885885
BOOL sameSurface;
886886
int nWidth, nHeight;
887-
RDPGFX_RECT16* rectSrc;
887+
RECTANGLE_16* rectSrc;
888888
RDPGFX_POINT16* destPt;
889889
RECTANGLE_16 invalidRect;
890890
xfGfxSurface* surfaceSrc;
@@ -947,7 +947,7 @@ UINT xf_SurfaceToSurface(RdpgfxClientContext* context, RDPGFX_SURFACE_TO_SURFACE
947947
UINT xf_SurfaceToCache(RdpgfxClientContext* context, RDPGFX_SURFACE_TO_CACHE_PDU* surfaceToCache)
948948
{
949949
size_t size;
950-
RDPGFX_RECT16* rect;
950+
RECTANGLE_16* rect;
951951
xfGfxSurface* surface;
952952
xfGfxCacheEntry* cacheEntry;
953953
xfContext* xfc = (xfContext*) context->custom;

‎include/freerdp/channels/rdpgfx.h

+5-14
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,6 @@ struct _RDPGFX_POINT16
3737
};
3838
typedef struct _RDPGFX_POINT16 RDPGFX_POINT16;
3939

40-
struct _RDPGFX_RECT16
41-
{
42-
UINT16 left;
43-
UINT16 top;
44-
UINT16 right;
45-
UINT16 bottom;
46-
};
47-
typedef struct _RDPGFX_RECT16 RDPGFX_RECT16;
48-
4940
struct _RDPGFX_COLOR32
5041
{
5142
BYTE B;
@@ -145,7 +136,7 @@ struct _RDPGFX_WIRE_TO_SURFACE_PDU_1
145136
UINT16 surfaceId;
146137
UINT16 codecId;
147138
RDPGFX_PIXELFORMAT pixelFormat;
148-
RDPGFX_RECT16 destRect;
139+
RECTANGLE_16 destRect;
149140
UINT32 bitmapDataLength;
150141
BYTE* bitmapData;
151142
};
@@ -195,15 +186,15 @@ struct _RDPGFX_SOLID_FILL_PDU
195186
UINT16 surfaceId;
196187
RDPGFX_COLOR32 fillPixel;
197188
UINT16 fillRectCount;
198-
RDPGFX_RECT16* fillRects;
189+
RECTANGLE_16* fillRects;
199190
};
200191
typedef struct _RDPGFX_SOLID_FILL_PDU RDPGFX_SOLID_FILL_PDU;
201192

202193
struct _RDPGFX_SURFACE_TO_SURFACE_PDU
203194
{
204195
UINT16 surfaceIdSrc;
205196
UINT16 surfaceIdDest;
206-
RDPGFX_RECT16 rectSrc;
197+
RECTANGLE_16 rectSrc;
207198
UINT16 destPtsCount;
208199
RDPGFX_POINT16* destPts;
209200
};
@@ -214,7 +205,7 @@ struct _RDPGFX_SURFACE_TO_CACHE_PDU
214205
UINT16 surfaceId;
215206
UINT64 cacheKey;
216207
UINT16 cacheSlot;
217-
RDPGFX_RECT16 rectSrc;
208+
RECTANGLE_16 rectSrc;
218209
};
219210
typedef struct _RDPGFX_SURFACE_TO_CACHE_PDU RDPGFX_SURFACE_TO_CACHE_PDU;
220211

@@ -349,7 +340,7 @@ typedef struct _RDPGFX_H264_QUANT_QUALITY RDPGFX_H264_QUANT_QUALITY;
349340
struct _RDPGFX_H264_METABLOCK
350341
{
351342
UINT32 numRegionRects;
352-
RDPGFX_RECT16* regionRects;
343+
RECTANGLE_16* regionRects;
353344
RDPGFX_H264_QUANT_QUALITY* quantQualityVals;
354345
};
355346
typedef struct _RDPGFX_H264_METABLOCK RDPGFX_H264_METABLOCK;

‎include/freerdp/codec/h264.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ FREERDP_API int h264_compress(H264_CONTEXT* h264, BYTE* pSrcData, DWORD SrcForma
7878

7979
FREERDP_API int h264_decompress(H264_CONTEXT* h264, BYTE* pSrcData, UINT32 SrcSize,
8080
BYTE** ppDstData, DWORD DstFormat, int nDstStep, int nDstWidth, int nDstHeight,
81-
RDPGFX_RECT16* regionRects, int numRegionRect);
81+
RECTANGLE_16* regionRects, int numRegionRect);
8282

8383
FREERDP_API BOOL h264_context_reset(H264_CONTEXT* h264, UINT32 width, UINT32 height);
8484

‎libfreerdp/codec/h264.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1353,7 +1353,7 @@ static H264_CONTEXT_SUBSYSTEM g_Subsystem_libavcodec =
13531353

13541354
int h264_decompress(H264_CONTEXT* h264, BYTE* pSrcData, UINT32 SrcSize,
13551355
BYTE** ppDstData, DWORD DstFormat, int nDstStep, int nDstWidth,
1356-
int nDstHeight, RDPGFX_RECT16* regionRects, int numRegionRects)
1356+
int nDstHeight, RECTANGLE_16* regionRects, int numRegionRects)
13571357
{
13581358
int index;
13591359
int status;
@@ -1364,7 +1364,7 @@ int h264_decompress(H264_CONTEXT* h264, BYTE* pSrcData, UINT32 SrcSize,
13641364
BYTE** pYUVData;
13651365
int width, height;
13661366
BYTE* pYUVPoint[3];
1367-
RDPGFX_RECT16* rect;
1367+
RECTANGLE_16* rect;
13681368
primitives_t* prims = primitives_get();
13691369

13701370
if (!h264)

‎libfreerdp/gdi/gfx.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -807,7 +807,7 @@ UINT gdi_SolidFill(RdpgfxClientContext* context, RDPGFX_SOLID_FILL_PDU* solidFil
807807
UINT32 color;
808808
BYTE a, r, g, b;
809809
int nWidth, nHeight;
810-
RDPGFX_RECT16* rect;
810+
RECTANGLE_16* rect;
811811
gdiGfxSurface* surface;
812812
RECTANGLE_16 invalidRect;
813813
rdpGdi* gdi = (rdpGdi*) context->custom;
@@ -861,7 +861,7 @@ UINT gdi_SurfaceToSurface(RdpgfxClientContext* context, RDPGFX_SURFACE_TO_SURFAC
861861
UINT16 index;
862862
BOOL sameSurface;
863863
int nWidth, nHeight;
864-
RDPGFX_RECT16* rectSrc;
864+
RECTANGLE_16* rectSrc;
865865
RDPGFX_POINT16* destPt;
866866
RECTANGLE_16 invalidRect;
867867
gdiGfxSurface* surfaceSrc;
@@ -922,7 +922,7 @@ UINT gdi_SurfaceToSurface(RdpgfxClientContext* context, RDPGFX_SURFACE_TO_SURFAC
922922
*/
923923
UINT gdi_SurfaceToCache(RdpgfxClientContext* context, RDPGFX_SURFACE_TO_CACHE_PDU* surfaceToCache)
924924
{
925-
RDPGFX_RECT16* rect;
925+
RECTANGLE_16* rect;
926926
gdiGfxSurface* surface;
927927
gdiGfxCacheEntry* cacheEntry;
928928
rdpGdi* gdi = (rdpGdi*) context->custom;

0 commit comments

Comments
 (0)
Please sign in to comment.