if (data)
{
- brushFormat = gdi_get_pixel_format(bpp, FALSE);
+ brushFormat = gdi_get_pixel_format(bpp);
cdata = (BYTE*) _aligned_malloc(width * height * 4, 16);
freerdp_image_copy(cdata, gdi->dstFormat, 0, 0, 0,
width, height, data, brushFormat, 0, 0, 0,
- &xfc->context.gdi->palette);
+ &xfc->context.gdi->palette, FREERDP_FLIP_NONE);
image = XCreateImage(xfc->display, xfc->visual, xfc->depth,
ZPixmap, 0, (char*) cdata, width, height, xfc->scanline_pad, 0);
gc = XCreateGC(xfc->display, xfc->drawable, 0, NULL);
break;
case RDP_CODEC_ID_NSCODEC:
- format = FREERDP_VFLIP_PIXEL_FORMAT(gdi->dstFormat);
+ format = gdi->dstFormat;
if (!nsc_process_message(context->codecs->nsc, cmd->bpp, cmd->width,
cmd->height, cmd->bitmapData, cmd->bitmapDataLength,
gdi->primary_buffer, format, stride,
- 0, 0, cmd->width, cmd->height))
+ 0, 0, cmd->width, cmd->height, FREERDP_FLIP_VERTICAL))
goto fail;
break;
case RDP_CODEC_ID_NONE:
pSrcData = cmd->bitmapData;
- format = PIXEL_FORMAT_BGRX32_VF;
+ format = PIXEL_FORMAT_BGRX32;
if (!freerdp_image_copy(gdi->primary_buffer, gdi->dstFormat, stride,
0, 0,
cmd->width, cmd->height, pSrcData,
- format, 0, 0, 0, &xfc->context.gdi->palette))
+ format, 0, 0, 0, &xfc->context.gdi->palette, FREERDP_FLIP_VERTICAL))
goto fail;
break;
surface->stageScanline, 0, 0,
surface->gdi.width, surface->gdi.height,
surface->gdi.data, surface->gdi.format,
- surface->gdi.scanline, 0, 0, NULL);
+ surface->gdi.scanline, 0, 0, NULL, FREERDP_FLIP_NONE);
}
#ifdef WITH_XRENDER
return FALSE;
xfc = (xfContext*)gdi->context;
- SrcFormat = gdi_get_pixel_format(gdi->context->settings->ColorDepth,
- FALSE);
+ SrcFormat = gdi_get_pixel_format(gdi->context->settings->ColorDepth);
if (format)
*format = SrcFormat;
freerdp_image_copy(data, gdi->dstFormat, 0, 0, 0,
bitmap->width, bitmap->height,
bitmap->data, SrcFormat,
- 0, 0, 0, &context->gdi->palette);
+ 0, 0, 0, &context->gdi->palette, FREERDP_FLIP_NONE);
_aligned_free(bitmap->data);
bitmap->data = data;
bitmap->format = gdi->dstFormat;
#define FREERDP_PIXEL_FORMAT_IS_ABGR(_format) (FREERDP_PIXEL_FORMAT_TYPE(_format) == FREERDP_PIXEL_FORMAT_TYPE_ABGR)
-#define FREERDP_PIXEL_FLIP_NONE 0
-#define FREERDP_PIXEL_FLIP_VERTICAL 1
-#define FREERDP_PIXEL_FLIP_HORIZONTAL 2
+#define FREERDP_FLIP_NONE 0
+#define FREERDP_FLIP_VERTICAL 1
+#define FREERDP_FLIP_HORIZONTAL 2
-#define FREERDP_PIXEL_FORMAT(_flip, _bpp, _type, _a, _r, _g, _b) \
- ((_flip << 30) | (_bpp << 24) | (_type << 16) | (_a << 12) | (_r << 8) | (_g << 4) | (_b))
+#define FREERDP_PIXEL_FORMAT(_bpp, _type, _a, _r, _g, _b) \
+ ((_bpp << 24) | (_type << 16) | (_a << 12) | (_r << 8) | (_g << 4) | (_b))
-#define FREERDP_PIXEL_FORMAT_FLIP(_format) (((_format) >> 30) & 0x03)
#define FREERDP_PIXEL_FORMAT_TYPE(_format) (((_format) >> 16) & 0x07)
-#define FREERDP_PIXEL_FORMAT_FLIP_MASKED(_format) (_format & 0x3FFFFFFF)
-
-#define FREERDP_VFLIP_PIXEL_FORMAT(format) \
- FREERDP_PIXEL_FORMAT_FLIP_MASKED(format) | (FREERDP_PIXEL_FLIP_VERTICAL << 30)
-
-#define FREERDP_HFLIP_PIXEL_FORMAT(format) \
- FREERDP_PIXEL_FORMAT_FLIP_MASKED(format) | (FREERDP_PIXEL_FLIP_HORIZONTAL << 30)
-
/*** Design considerations
*
* The format naming scheme is based on byte position in memory.
*/
/* 32bpp formats */
-#define PIXEL_FORMAT_A8R8G8B8_F(_flip) FREERDP_PIXEL_FORMAT(_flip, 32, FREERDP_PIXEL_FORMAT_TYPE_ARGB, 8, 8, 8, 8)
+#define PIXEL_FORMAT_A8R8G8B8_F() FREERDP_PIXEL_FORMAT(32, FREERDP_PIXEL_FORMAT_TYPE_ARGB, 8, 8, 8, 8)
-#define PIXEL_FORMAT_ARGB32 PIXEL_FORMAT_A8R8G8B8_F(0)
-#define PIXEL_FORMAT_ARGB32_VF PIXEL_FORMAT_A8R8G8B8_F(1)
+#define PIXEL_FORMAT_ARGB32 PIXEL_FORMAT_A8R8G8B8_F()
-#define PIXEL_FORMAT_X8R8G8B8_F(_flip) FREERDP_PIXEL_FORMAT(_flip, 32, FREERDP_PIXEL_FORMAT_TYPE_ARGB, 0, 8, 8, 8)
-#define PIXEL_FORMAT_XRGB32 PIXEL_FORMAT_X8R8G8B8_F(0)
-#define PIXEL_FORMAT_XRGB32_VF PIXEL_FORMAT_X8R8G8B8_F(1)
+#define PIXEL_FORMAT_X8R8G8B8_F(_flip) FREERDP_PIXEL_FORMAT(32, FREERDP_PIXEL_FORMAT_TYPE_ARGB, 0, 8, 8, 8)
+#define PIXEL_FORMAT_XRGB32 PIXEL_FORMAT_X8R8G8B8_F()
-#define PIXEL_FORMAT_A8B8G8R8_F(_flip) FREERDP_PIXEL_FORMAT(_flip, 32, FREERDP_PIXEL_FORMAT_TYPE_ABGR, 8, 8, 8, 8)
-#define PIXEL_FORMAT_ABGR32 PIXEL_FORMAT_A8B8G8R8_F(0)
-#define PIXEL_FORMAT_ABGR32_VF PIXEL_FORMAT_A8B8G8R8_F(1)
+#define PIXEL_FORMAT_A8B8G8R8_F(_flip) FREERDP_PIXEL_FORMAT(32, FREERDP_PIXEL_FORMAT_TYPE_ABGR, 8, 8, 8, 8)
+#define PIXEL_FORMAT_ABGR32 PIXEL_FORMAT_A8B8G8R8_F()
-#define PIXEL_FORMAT_X8B8G8R8_F(_flip) FREERDP_PIXEL_FORMAT(_flip, 32, FREERDP_PIXEL_FORMAT_TYPE_ABGR, 0, 8, 8, 8)
-#define PIXEL_FORMAT_XBGR32 PIXEL_FORMAT_X8B8G8R8_F(0)
-#define PIXEL_FORMAT_XBGR32_VF PIXEL_FORMAT_X8B8G8R8_F(1)
+#define PIXEL_FORMAT_X8B8G8R8_F(_flip) FREERDP_PIXEL_FORMAT(32, FREERDP_PIXEL_FORMAT_TYPE_ABGR, 0, 8, 8, 8)
+#define PIXEL_FORMAT_XBGR32 PIXEL_FORMAT_X8B8G8R8_F()
-#define PIXEL_FORMAT_B8G8R8A8_F(_flip) FREERDP_PIXEL_FORMAT(_flip, 32, FREERDP_PIXEL_FORMAT_TYPE_BGRA, 8, 8, 8, 8)
-#define PIXEL_FORMAT_BGRA32 PIXEL_FORMAT_B8G8R8A8_F(0)
-#define PIXEL_FORMAT_BGRA32_VF PIXEL_FORMAT_B8G8R8A8_F(1)
+#define PIXEL_FORMAT_B8G8R8A8_F(_flip) FREERDP_PIXEL_FORMAT(32, FREERDP_PIXEL_FORMAT_TYPE_BGRA, 8, 8, 8, 8)
+#define PIXEL_FORMAT_BGRA32 PIXEL_FORMAT_B8G8R8A8_F()
-#define PIXEL_FORMAT_B8G8R8X8_F(_flip) FREERDP_PIXEL_FORMAT(_flip, 32, FREERDP_PIXEL_FORMAT_TYPE_BGRA, 0, 8, 8, 8)
-#define PIXEL_FORMAT_BGRX32 PIXEL_FORMAT_B8G8R8X8_F(0)
-#define PIXEL_FORMAT_BGRX32_VF PIXEL_FORMAT_B8G8R8X8_F(1)
+#define PIXEL_FORMAT_B8G8R8X8_F(_flip) FREERDP_PIXEL_FORMAT(32, FREERDP_PIXEL_FORMAT_TYPE_BGRA, 0, 8, 8, 8)
+#define PIXEL_FORMAT_BGRX32 PIXEL_FORMAT_B8G8R8X8_F()
-#define PIXEL_FORMAT_R8G8B8A8_F(_flip) FREERDP_PIXEL_FORMAT(_flip, 32, FREERDP_PIXEL_FORMAT_TYPE_RGBA, 8, 8, 8, 8)
-#define PIXEL_FORMAT_RGBA32 PIXEL_FORMAT_R8G8B8A8_F(0)
-#define PIXEL_FORMAT_RGBA32_VF PIXEL_FORMAT_R8G8B8A8_F(1)
+#define PIXEL_FORMAT_R8G8B8A8_F(_flip) FREERDP_PIXEL_FORMAT(32, FREERDP_PIXEL_FORMAT_TYPE_RGBA, 8, 8, 8, 8)
+#define PIXEL_FORMAT_RGBA32 PIXEL_FORMAT_R8G8B8A8_F()
-#define PIXEL_FORMAT_R8G8B8X8_F(_flip) FREERDP_PIXEL_FORMAT(_flip, 32, FREERDP_PIXEL_FORMAT_TYPE_RGBA, 0, 8, 8, 8)
-#define PIXEL_FORMAT_RGBX32 PIXEL_FORMAT_R8G8B8X8_F(0)
-#define PIXEL_FORMAT_RGBX32_VF PIXEL_FORMAT_R8G8B8X8_F(1)
+#define PIXEL_FORMAT_R8G8B8X8_F(_flip) FREERDP_PIXEL_FORMAT(32, FREERDP_PIXEL_FORMAT_TYPE_RGBA, 0, 8, 8, 8)
+#define PIXEL_FORMAT_RGBX32 PIXEL_FORMAT_R8G8B8X8_F()
/* 24bpp formats */
-#define PIXEL_FORMAT_R8G8B8_F(_flip) FREERDP_PIXEL_FORMAT(_flip, 24, FREERDP_PIXEL_FORMAT_TYPE_ARGB, 0, 8, 8, 8)
-#define PIXEL_FORMAT_RGB24 PIXEL_FORMAT_R8G8B8_F(0)
-#define PIXEL_FORMAT_RGB24_VF PIXEL_FORMAT_R8G8B8_F(1)
+#define PIXEL_FORMAT_R8G8B8_F(_flip) FREERDP_PIXEL_FORMAT(24, FREERDP_PIXEL_FORMAT_TYPE_ARGB, 0, 8, 8, 8)
+#define PIXEL_FORMAT_RGB24 PIXEL_FORMAT_R8G8B8_F()
-#define PIXEL_FORMAT_B8G8R8_F(_flip) FREERDP_PIXEL_FORMAT(_flip, 24, FREERDP_PIXEL_FORMAT_TYPE_ABGR, 0, 8, 8, 8)
-#define PIXEL_FORMAT_BGR24 PIXEL_FORMAT_B8G8R8_F(0)
-#define PIXEL_FORMAT_BGR24_VF PIXEL_FORMAT_B8G8R8_F(1)
+#define PIXEL_FORMAT_B8G8R8_F(_flip) FREERDP_PIXEL_FORMAT(24, FREERDP_PIXEL_FORMAT_TYPE_ABGR, 0, 8, 8, 8)
+#define PIXEL_FORMAT_BGR24 PIXEL_FORMAT_B8G8R8_F()
/* 16bpp formats */
-#define PIXEL_FORMAT_R5G6B5_F(_flip) FREERDP_PIXEL_FORMAT(_flip, 16, FREERDP_PIXEL_FORMAT_TYPE_ARGB, 0, 5, 6, 5)
-#define PIXEL_FORMAT_RGB16 PIXEL_FORMAT_R5G6B5_F(0)
-#define PIXEL_FORMAT_RGB16_VF PIXEL_FORMAT_R5G6B5_F(1)
+#define PIXEL_FORMAT_R5G6B5_F(_flip) FREERDP_PIXEL_FORMAT(16, FREERDP_PIXEL_FORMAT_TYPE_ARGB, 0, 5, 6, 5)
+#define PIXEL_FORMAT_RGB16 PIXEL_FORMAT_R5G6B5_F()
-#define PIXEL_FORMAT_B5G6R5_F(_flip) FREERDP_PIXEL_FORMAT(_flip, 16, FREERDP_PIXEL_FORMAT_TYPE_ABGR, 0, 5, 6, 5)
-#define PIXEL_FORMAT_BGR16 PIXEL_FORMAT_B5G6R5_F(0)
-#define PIXEL_FORMAT_BGR16_VF PIXEL_FORMAT_B5G6R5_F(1)
+#define PIXEL_FORMAT_B5G6R5_F(_flip) FREERDP_PIXEL_FORMAT(16, FREERDP_PIXEL_FORMAT_TYPE_ABGR, 0, 5, 6, 5)
+#define PIXEL_FORMAT_BGR16 PIXEL_FORMAT_B5G6R5_F()
-#define PIXEL_FORMAT_A1R5G5B5_F(_flip) FREERDP_PIXEL_FORMAT(_flip, 16, FREERDP_PIXEL_FORMAT_TYPE_ARGB, 1, 5, 5, 5)
-#define PIXEL_FORMAT_ARGB15 PIXEL_FORMAT_A1R5G5B5_F(0)
-#define PIXEL_FORMAT_ARGB15_VF PIXEL_FORMAT_A1R5G5B5_F(1)
+#define PIXEL_FORMAT_A1R5G5B5_F(_flip) FREERDP_PIXEL_FORMAT(16, FREERDP_PIXEL_FORMAT_TYPE_ARGB, 1, 5, 5, 5)
+#define PIXEL_FORMAT_ARGB15 PIXEL_FORMAT_A1R5G5B5_F()
-#define PIXEL_FORMAT_X1R5G5B5_F(_flip) FREERDP_PIXEL_FORMAT(_flip, 15, FREERDP_PIXEL_FORMAT_TYPE_ARGB, 0, 5, 5, 5)
-#define PIXEL_FORMAT_RGB15 PIXEL_FORMAT_X1R5G5B5_F(0)
-#define PIXEL_FORMAT_RGB15_VF PIXEL_FORMAT_X1R5G5B5_F(1)
+#define PIXEL_FORMAT_X1R5G5B5_F(_flip) FREERDP_PIXEL_FORMAT(15, FREERDP_PIXEL_FORMAT_TYPE_ARGB, 0, 5, 5, 5)
+#define PIXEL_FORMAT_RGB15 PIXEL_FORMAT_X1R5G5B5_F()
-#define PIXEL_FORMAT_A1B5G5R5_F(_flip) FREERDP_PIXEL_FORMAT(_flip, 16, FREERDP_PIXEL_FORMAT_TYPE_ABGR, 1, 5, 5, 5)
-#define PIXEL_FORMAT_ABGR15 PIXEL_FORMAT_A1B5G5R5_F(0)
-#define PIXEL_FORMAT_ABGR15_VF PIXEL_FORMAT_A1B5G5R5_F(1)
+#define PIXEL_FORMAT_A1B5G5R5_F(_flip) FREERDP_PIXEL_FORMAT(16, FREERDP_PIXEL_FORMAT_TYPE_ABGR, 1, 5, 5, 5)
+#define PIXEL_FORMAT_ABGR15 PIXEL_FORMAT_A1B5G5R5_F()
-#define PIXEL_FORMAT_X1B5G5R5_F(_flip) FREERDP_PIXEL_FORMAT(_flip, 15, FREERDP_PIXEL_FORMAT_TYPE_ABGR, 0, 5, 5, 5)
-#define PIXEL_FORMAT_BGR15 PIXEL_FORMAT_X1B5G5R5_F(0)
-#define PIXEL_FORMAT_BGR15_VF PIXEL_FORMAT_X1B5G5R5_F(1)
+#define PIXEL_FORMAT_X1B5G5R5_F(_flip) FREERDP_PIXEL_FORMAT(15, FREERDP_PIXEL_FORMAT_TYPE_ABGR, 0, 5, 5, 5)
+#define PIXEL_FORMAT_BGR15 PIXEL_FORMAT_X1B5G5R5_F()
/* 8bpp formats */
-#define PIXEL_FORMAT_A8_F(_flip) FREERDP_PIXEL_FORMAT(_flip, 8, FREERDP_PIXEL_FORMAT_TYPE_A, 8, 0, 0, 0)
-#define PIXEL_FORMAT_RGB8 PIXEL_FORMAT_A8_F(0)
-#define PIXEL_FORMAT_RGB8_VF PIXEL_FORMAT_A8_F(1)
+#define PIXEL_FORMAT_A8_F(_flip) FREERDP_PIXEL_FORMAT(8, FREERDP_PIXEL_FORMAT_TYPE_A, 8, 0, 0, 0)
+#define PIXEL_FORMAT_RGB8 PIXEL_FORMAT_A8_F()
/* 4 bpp formats */
-#define PIXEL_FORMAT_A4_F(_flip) FREERDP_PIXEL_FORMAT(_flip, 4, FREERDP_PIXEL_FORMAT_TYPE_A, 4, 0, 0, 0)
-#define PIXEL_FORMAT_A4 PIXEL_FORMAT_A4_F(0)
-#define PIXEL_FORMAT_A4_VF PIXEL_FORMAT_A4_F(1)
+#define PIXEL_FORMAT_A4_F(_flip) FREERDP_PIXEL_FORMAT(4, FREERDP_PIXEL_FORMAT_TYPE_A, 4, 0, 0, 0)
+#define PIXEL_FORMAT_A4 PIXEL_FORMAT_A4_F()
/* 1bpp formats */
-#define PIXEL_FORMAT_A1_F(_flip) FREERDP_PIXEL_FORMAT(_flip, 1, FREERDP_PIXEL_FORMAT_TYPE_A, 1, 0, 0, 0)
-#define PIXEL_FORMAT_MONO PIXEL_FORMAT_A1_F(0)
-#define PIXEL_FORMAT_MONO_VF PIXEL_FORMAT_A1_F(1)
+#define PIXEL_FORMAT_A1_F(_flip) FREERDP_PIXEL_FORMAT(1, FREERDP_PIXEL_FORMAT_TYPE_A, 1, 0, 0, 0)
+#define PIXEL_FORMAT_MONO PIXEL_FORMAT_A1_F()
struct gdi_palette
{
case PIXEL_FORMAT_ARGB32:
return "PIXEL_FORMAT_ARGB32";
- case PIXEL_FORMAT_ARGB32_VF:
- return "PIXEL_FORMAT_ARGB32_VF";
-
case PIXEL_FORMAT_XRGB32:
return "PIXEL_FORMAT_XRGB32";
- case PIXEL_FORMAT_XRGB32_VF:
- return "PIXEL_FORMAT_XRGB32_VF";
-
case PIXEL_FORMAT_ABGR32:
return "PIXEL_FORMAT_ABGR32";
- case PIXEL_FORMAT_ABGR32_VF:
- return "PIXEL_FORMAT_ABGR32_VF";
-
case PIXEL_FORMAT_XBGR32:
return "PIXEL_FORMAT_XBGR32";
- case PIXEL_FORMAT_XBGR32_VF:
- return "PIXEL_FORMAT_XBGR32_VF";
-
case PIXEL_FORMAT_BGRA32:
return "PIXEL_FORMAT_BGRA32";
- case PIXEL_FORMAT_BGRA32_VF:
- return "PIXEL_FORMAT_BGRA32_VF";
-
case PIXEL_FORMAT_BGRX32:
return "PIXEL_FORMAT_BGRX32";
- case PIXEL_FORMAT_BGRX32_VF:
- return "PIXEL_FORMAT_BGRX32_VF";
-
case PIXEL_FORMAT_RGBA32:
return "PIXEL_FORMAT_RGBA32";
- case PIXEL_FORMAT_RGBA32_VF:
- return "PIXEL_FORMAT_RGBA32_VF";
-
case PIXEL_FORMAT_RGBX32:
return "PIXEL_FORMAT_RGBX32";
- case PIXEL_FORMAT_RGBX32_VF:
- return "PIXEL_FORMAT_RGBX32_VF";
-
/* 24bpp formats */
case PIXEL_FORMAT_RGB24:
return "PIXEL_FORMAT_RGB24";
- case PIXEL_FORMAT_RGB24_VF:
- return "PIXEL_FORMAT_RGB24_VF";
-
case PIXEL_FORMAT_BGR24:
return "PIXEL_FORMAT_BGR24";
- case PIXEL_FORMAT_BGR24_VF:
- return "PIXEL_FORMAT_BGR24_VF";
-
/* 16bpp formats */
case PIXEL_FORMAT_RGB16:
return "PIXEL_FORMAT_RGB16";
- case PIXEL_FORMAT_RGB16_VF:
- return "PIXEL_FORMAT_RGB16_VF";
-
case PIXEL_FORMAT_BGR16:
return "PIXEL_FORMAT_BGR16";
- case PIXEL_FORMAT_BGR16_VF:
- return "PIXEL_FORMAT_BGR16_VF";
-
case PIXEL_FORMAT_ARGB15:
return "PIXEL_FORMAT_ARGB15";
- case PIXEL_FORMAT_ARGB15_VF:
- return "PIXEL_FORMAT_ARGB15_VF";
-
case PIXEL_FORMAT_RGB15:
return "PIXEL_FORMAT_RGB15";
- case PIXEL_FORMAT_RGB15_VF:
- return "PIXEL_FORMAT_ABGR15";
-
case PIXEL_FORMAT_ABGR15:
- return "";
-
- case PIXEL_FORMAT_ABGR15_VF:
- return "PIXEL_FORMAT_ABGR15_VF";
+ return "PIXEL_FORMAT_ABGR15";
case PIXEL_FORMAT_BGR15:
return "PIXEL_FORMAT_BGR15";
- case PIXEL_FORMAT_BGR15_VF:
- return "PIXEL_FORMAT_BGR15_VF";
-
/* 8bpp formats */
case PIXEL_FORMAT_RGB8:
return "PIXEL_FORMAT_RGB8";
- case PIXEL_FORMAT_RGB8_VF:
- return "PIXEL_FORMAT_RGB8_VF";
-
/* 4 bpp formats */
case PIXEL_FORMAT_A4:
return "PIXEL_FORMAT_A4";
- case PIXEL_FORMAT_A4_VF:
- return "PIXEL_FORMAT_A4_VF";
-
/* 1bpp formats */
case PIXEL_FORMAT_MONO:
return "PIXEL_FORMAT_MONO";
- case PIXEL_FORMAT_MONO_VF:
- return "PIXEL_FORMAT_MONO_VF";
-
default:
return "UNKNOWN";
}
{
UINT32 tmp;
- switch (FREERDP_PIXEL_FORMAT_FLIP_MASKED(format))
+ switch (format)
{
/* 32bpp formats */
case PIXEL_FORMAT_ARGB32:
UINT32 _b = b;
UINT32 _a = a;
- switch (FREERDP_PIXEL_FORMAT_FLIP_MASKED(format))
+ switch (format)
{
/* 32bpp formats */
case PIXEL_FORMAT_ARGB32:
* @param nXSrc source buffer x offset in pixels
* @param nYSrc source buffer y offset in pixels
* @param palette pallete to use (only used for 8 bit color!)
+ * @param flags Image flipping flags FREERDP_FLIP_NONE et al
*
* @return TRUE if success, FALSE otherwise
*/
UINT32 nWidth, UINT32 nHeight,
const BYTE* pSrcData, DWORD SrcFormat,
UINT32 nSrcStep, UINT32 nXSrc, UINT32 nYSrc,
- const gdiPalette* palette);
+ const gdiPalette* palette, UINT32 flags);
/***
*
const BYTE* data, UINT32 length,
BYTE* pDstData, UINT32 DstFormat,
UINT32 nDstStride, UINT32 nXDst, UINT32 nYDst,
- UINT32 nWidth, UINT32 nHeight);
+ UINT32 nWidth, UINT32 nHeight, UINT32 flip);
FREERDP_API BOOL nsc_compose_message(NSC_CONTEXT* context, wStream* s,
const BYTE* bmpdata,
UINT32 width, UINT32 height, UINT32 rowstride);
#endif
FREERDP_API DWORD gdi_rop3_code(BYTE code);
-FREERDP_API UINT32 gdi_get_pixel_format(UINT32 bitsPerPixel, BOOL vFlip);
+FREERDP_API UINT32 gdi_get_pixel_format(UINT32 bitsPerPixel);
FREERDP_API BOOL gdi_decode_color(rdpGdi* gdi, const UINT32 srcColor,
UINT32* color, UINT32* format);
FREERDP_API BOOL gdi_resize(rdpGdi* gdi, UINT32 width, UINT32 height);
rc = nsc_process_message(nsc, 32, width, height, Stream_Pointer(s),
bitmapDataByteCount, pDstData, DstFormat,
- nDstStep, nXDstRel, nYDstRel, width, height);
+ nDstStep, nXDstRel, nYDstRel, width, height, FREERDP_FLIP_NONE);
Stream_Seek(s, bitmapDataByteCount);
return rc;
}
}
BOOL freerdp_image_copy_from_monochrome(BYTE* pDstData, UINT32 DstFormat,
- UINT32 nDstStep, UINT32 nXDst, UINT32 nYDst,
- UINT32 nWidth, UINT32 nHeight,
- const BYTE* pSrcData,
- UINT32 backColor, UINT32 foreColor,
- const gdiPalette* palette)
+ UINT32 nDstStep, UINT32 nXDst, UINT32 nYDst,
+ UINT32 nWidth, UINT32 nHeight,
+ const BYTE* pSrcData,
+ UINT32 backColor, UINT32 foreColor,
+ const gdiPalette* palette)
{
UINT32 x, y;
BOOL vFlip;
- UINT32 srcFlip;
- UINT32 dstFlip;
UINT32 nDstPad;
UINT32 monoStep;
UINT32 dstBitsPerPixel;
UINT32 dstBytesPerPixel;
dstBitsPerPixel = GetBitsPerPixel(DstFormat);
dstBytesPerPixel = GetBytesPerPixel(DstFormat);
- dstFlip = FREERDP_PIXEL_FORMAT_FLIP(DstFormat);
if (nDstStep == 0)
nDstStep = dstBytesPerPixel * nWidth;
nDstPad = (nDstStep - (nWidth * dstBytesPerPixel));
- srcFlip = FREERDP_PIXEL_FLIP_NONE;
- vFlip = (srcFlip != dstFlip) ? TRUE : FALSE;
+ vFlip = FALSE;
monoStep = (nWidth + 7) / 8;
for (y = 0; y < nHeight; y++)
}
static INLINE UINT32 freerdp_image_inverted_pointer_color(UINT32 x, UINT32 y,
- UINT32 format)
+ UINT32 format)
{
#if 1
/**
{
UINT32 x, y;
BOOL vFlip;
- UINT32 srcFlip;
- UINT32 dstFlip;
UINT32 nDstPad;
UINT32 xorStep;
UINT32 andStep;
UINT32 dstBytesPerPixel;
dstBitsPerPixel = GetBitsPerPixel(DstFormat);
dstBytesPerPixel = GetBytesPerPixel(DstFormat);
- dstFlip = FREERDP_PIXEL_FORMAT_FLIP(DstFormat);
-
- if (FREERDP_PIXEL_FORMAT_FLIP(DstFormat))
- {
- WLog_ERR(TAG, "Format %s not supported!", GetColorFormatName(DstFormat));
- return FALSE;
- }
if (nDstStep <= 0)
nDstStep = dstBytesPerPixel * nWidth;
nDstPad = (nDstStep - (nWidth * dstBytesPerPixel));
- srcFlip = (xorBpp == 1) ? FREERDP_PIXEL_FLIP_NONE : FREERDP_PIXEL_FLIP_VERTICAL;
- vFlip = (srcFlip != dstFlip) ? TRUE : FALSE;
+ vFlip = (xorBpp == 1) ? FALSE : TRUE;
andStep = (nWidth + 7) / 8;
andStep += (andStep % 2);
const BYTE* andBits;
const BYTE* xorBits;
BYTE* pDstPixel = &pDstData[((nYDst + y) * nDstStep) +
- (nXDst * GetBytesPerPixel(DstFormat))];
+ (nXDst * GetBytesPerPixel(DstFormat))];
xorBit = andBit = 0x80;
if (!vFlip)
if (xorBpp == 8 && !palette)
{
WLog_ERR(TAG, "null palette in convertion from %d bpp to %d bpp",
- xorBpp, dstBitsPerPixel);
+ xorBpp, dstBitsPerPixel);
return -1;
}
const BYTE* xorBits;
const BYTE* andBits = NULL;
BYTE* pDstPixel = &pDstData[((nYDst + y) * nDstStep) +
- (nXDst * GetBytesPerPixel(DstFormat))];
+ (nXDst * GetBytesPerPixel(DstFormat))];
andBit = 0x80;
if (!vFlip)
}
xorPixel = ConvertColor(xorPixel,
- pixelFormat,
- PIXEL_FORMAT_ARGB32,
- palette);
+ pixelFormat,
+ PIXEL_FORMAT_ARGB32,
+ palette);
xorBits += xorBytesPerPixel;
andPixel = 0;
}
color = ConvertColor(xorPixel, PIXEL_FORMAT_ARGB32,
- DstFormat, palette);
+ DstFormat, palette);
WriteColor(pDstPixel, DstFormat, color);
pDstPixel += GetBytesPerPixel(DstFormat);
}
default:
WLog_ERR(TAG, "failed to convert from %d bpp to %d bpp",
- xorBpp, dstBitsPerPixel);
+ xorBpp, dstBitsPerPixel);
return -1;
}
}
static BOOL overlapping(const BYTE* pDstData, UINT32 nXDst, UINT32 nYDst,
- UINT32 nDstStep, UINT32 dstBytesPerPixel,
- const BYTE* pSrcData, UINT32 nXSrc, UINT32 nYSrc,
- UINT32 nSrcStep, UINT32 srcBytesPerPixel,
- UINT32 nWidth, UINT32 nHeight)
+ UINT32 nDstStep, UINT32 dstBytesPerPixel,
+ const BYTE* pSrcData, UINT32 nXSrc, UINT32 nYSrc,
+ UINT32 nSrcStep, UINT32 srcBytesPerPixel,
+ UINT32 nWidth, UINT32 nHeight)
{
const BYTE* pDstStart = &pDstData[nXDst * dstBytesPerPixel + nYDst * nDstStep];
const BYTE* pDstEnd = pDstStart + nHeight * nDstStep;
}
BOOL freerdp_image_copy(BYTE* pDstData, DWORD DstFormat,
- UINT32 nDstStep, UINT32 nXDst, UINT32 nYDst,
- UINT32 nWidth, UINT32 nHeight,
- const BYTE* pSrcData, DWORD SrcFormat,
- UINT32 nSrcStep, UINT32 nXSrc, UINT32 nYSrc,
- const gdiPalette* palette)
+ UINT32 nDstStep, UINT32 nXDst, UINT32 nYDst,
+ UINT32 nWidth, UINT32 nHeight,
+ const BYTE* pSrcData, DWORD SrcFormat,
+ UINT32 nSrcStep, UINT32 nXSrc, UINT32 nYSrc,
+ const gdiPalette* palette, UINT32 flags)
{
const UINT32 dstByte = GetBytesPerPixel(DstFormat);
const UINT32 srcByte = GetBytesPerPixel(SrcFormat);
const UINT32 copyDstWidth = nWidth * dstByte;
const UINT32 xSrcOffset = nXSrc * srcByte;
const UINT32 xDstOffset = nXDst * dstByte;
- BOOL vSrcVFlip = FALSE;
- BOOL vDstVFlip = FALSE;
- BOOL vSrcHFlip = FALSE;
- BOOL vDstHFlip = FALSE;
+ BOOL vSrcVFlip = flags & FREERDP_FLIP_VERTICAL;
+ BOOL vSrcHFlip = flags & FREERDP_FLIP_HORIZONTAL;
UINT32 srcVOffset = 0;
INT32 srcVMultiplier = 1;
UINT32 dstVOffset = 0;
if (!pDstData || !pSrcData)
return FALSE;
- switch (FREERDP_PIXEL_FORMAT_FLIP(SrcFormat))
- {
- case FREERDP_PIXEL_FLIP_HORIZONTAL:
- vSrcHFlip = TRUE;
- return FALSE;
-
- case FREERDP_PIXEL_FLIP_VERTICAL:
- vSrcVFlip = TRUE;
- break;
-
- case FREERDP_PIXEL_FLIP_NONE:
- default:
- break;
- }
-
- switch (FREERDP_PIXEL_FORMAT_FLIP(DstFormat))
- {
- case FREERDP_PIXEL_FLIP_HORIZONTAL:
- vDstHFlip = TRUE;
- return FALSE;
-
- case FREERDP_PIXEL_FLIP_VERTICAL:
- vDstVFlip = TRUE;
- break;
-
- case FREERDP_PIXEL_FLIP_NONE:
- default:
- break;
- }
-
if (nDstStep == 0)
nDstStep = nWidth * GetBytesPerPixel(DstFormat);
srcVMultiplier = -1;
}
- if (vDstVFlip)
- {
- dstVOffset = (nHeight - 1) * nDstStep;
- dstVMultiplier = -1;
- }
-
- if (vSrcHFlip || vDstHFlip)
- {
- WLog_ERR(TAG, "Horizontal flipping not supported! %s %s",
- GetColorFormatName(SrcFormat), GetColorFormatName(DstFormat));
- return FALSE;
- }
-
- if (FREERDP_PIXEL_FORMAT_FLIP_MASKED(SrcFormat) ==
- FREERDP_PIXEL_FORMAT_FLIP_MASKED(DstFormat))
+ if (SrcFormat == DstFormat)
{
INT32 y;
if (overlapping(pDstData, nXDst, nYDst, nDstStep, dstByte,
- pSrcData, nXSrc, nYSrc, nSrcStep, srcByte,
- nWidth, nHeight))
+ pSrcData, nXSrc, nYSrc, nSrcStep, srcByte,
+ nWidth, nHeight))
{
/* Copy down */
if (nYDst < nYSrc)
for (y = 0; y < nHeight; y++)
{
const BYTE* srcLine = &pSrcData[(y + nYSrc) *
- nSrcStep * srcVMultiplier +
- srcVOffset];
+ nSrcStep * srcVMultiplier +
+ srcVOffset];
BYTE* dstLine = &pDstData[(y + nYDst) *
- nDstStep * dstVMultiplier +
- dstVOffset];
+ nDstStep * dstVMultiplier +
+ dstVOffset];
memcpy(&dstLine[xDstOffset],
&srcLine[xSrcOffset], copyDstWidth);
}
for (y = nHeight - 1; y >= 0; y--)
{
const BYTE* srcLine = &pSrcData[(y + nYSrc) *
- nSrcStep * srcVMultiplier +
- srcVOffset];
+ nSrcStep * srcVMultiplier +
+ srcVOffset];
BYTE* dstLine = &pDstData[(y + nYDst) *
- nDstStep * dstVMultiplier +
- dstVOffset];
+ nDstStep * dstVMultiplier +
+ dstVOffset];
memcpy(&dstLine[xDstOffset],
&srcLine[xSrcOffset], copyDstWidth);
}
for (y = 0; y < nHeight; y++)
{
const BYTE* srcLine = &pSrcData[(y + nYSrc) *
- nSrcStep * srcVMultiplier +
- srcVOffset];
+ nSrcStep * srcVMultiplier +
+ srcVOffset];
BYTE* dstLine = &pDstData[(y + nYDst) *
- nDstStep * dstVMultiplier +
- dstVOffset];
+ nDstStep * dstVMultiplier +
+ dstVOffset];
memmove(&dstLine[xDstOffset],
- &srcLine[xSrcOffset], copyDstWidth);
+ &srcLine[xSrcOffset], copyDstWidth);
}
}
/* Copy right */
for (y = nHeight - 1; y >= 0; y--)
{
const BYTE* srcLine = &pSrcData[(y + nYSrc) *
- nSrcStep * srcVMultiplier +
- srcVOffset];
+ nSrcStep * srcVMultiplier +
+ srcVOffset];
BYTE* dstLine = &pDstData[(y + nYDst) *
- nDstStep * dstVMultiplier +
- dstVOffset];
+ nDstStep * dstVMultiplier +
+ dstVOffset];
memmove(&dstLine[xDstOffset],
- &srcLine[xSrcOffset], copyDstWidth);
+ &srcLine[xSrcOffset], copyDstWidth);
}
}
/* Source and destination are equal... */
for (y = 0; y < nHeight; y++)
{
const BYTE* srcLine = &pSrcData[(y + nYSrc) *
- nSrcStep * srcVMultiplier +
- srcVOffset];
+ nSrcStep * srcVMultiplier +
+ srcVOffset];
BYTE* dstLine = &pDstData[(y + nYDst) *
- nDstStep * dstVMultiplier +
- dstVOffset];
+ nDstStep * dstVMultiplier +
+ dstVOffset];
memcpy(&dstLine[xDstOffset],
&srcLine[xSrcOffset], copyDstWidth);
}
for (y = 0; y < nHeight; y++)
{
const BYTE* srcLine = &pSrcData[(y + nYSrc) *
- nSrcStep * srcVMultiplier +
- srcVOffset];
+ nSrcStep * srcVMultiplier +
+ srcVOffset];
BYTE* dstLine = &pDstData[(y + nYDst) *
- nDstStep * dstVMultiplier + dstVOffset];
+ nDstStep * dstVMultiplier + dstVOffset];
for (x = 0; x < nWidth; x++)
{
UINT32 dstColor;
UINT32 color = ReadColor(&srcLine[(x + nXSrc) * srcByte],
- SrcFormat);
+ SrcFormat);
dstColor = ConvertColor(color, SrcFormat, DstFormat, palette);
WriteColor(&dstLine[(x + nXDst) * dstByte], DstFormat, dstColor);
}
}
BOOL freerdp_image_fill(BYTE* pDstData, DWORD DstFormat,
- UINT32 nDstStep, UINT32 nXDst, UINT32 nYDst,
- UINT32 nWidth, UINT32 nHeight, UINT32 color)
+ UINT32 nDstStep, UINT32 nXDst, UINT32 nYDst,
+ UINT32 nWidth, UINT32 nHeight, UINT32 color)
{
UINT32 x, y;
* Extract the run length of a compression order.
*/
static INLINE UINT32 ExtractRunLength(UINT32 code, const BYTE* pbOrderHdr,
- UINT32* advance)
+ UINT32* advance)
{
UINT32 runLength;
UINT32 ladvance;
#define DESTWRITEPIXEL(_buf, _pix) do { (_buf)[0] = (BYTE)(_pix); \
(_buf)[1] = (BYTE)((_pix) >> 8); (_buf)[2] = (BYTE)((_pix) >> 16); } while (0)
#define DESTREADPIXEL(_pix, _buf) _pix = (_buf)[0] | ((_buf)[1] << 8) | \
- ((_buf)[2] << 16)
+ ((_buf)[2] << 16)
#define SRCREADPIXEL(_pix, _buf) _pix = (_buf)[0] | ((_buf)[1] << 8) | \
- ((_buf)[2] << 16)
+ ((_buf)[2] << 16)
#define DESTNEXTPIXEL(_buf) _buf += 3
#define SRCNEXTPIXEL(_buf) _buf += 3
#define WRITEFGBGIMAGE WriteFgBgImage24to24
#include "include/bitmap.c"
BOOL interleaved_decompress(BITMAP_INTERLEAVED_CONTEXT* interleaved,
- const BYTE* pSrcData, UINT32 SrcSize,
- UINT32 nSrcWidth, UINT32 nSrcHeight,
- UINT32 bpp,
- BYTE* pDstData, UINT32 DstFormat,
- UINT32 nDstStep, UINT32 nXDst, UINT32 nYDst,
- UINT32 nDstWidth, UINT32 nDstHeight,
- const gdiPalette* palette)
+ const BYTE* pSrcData, UINT32 SrcSize,
+ UINT32 nSrcWidth, UINT32 nSrcHeight,
+ UINT32 bpp,
+ BYTE* pDstData, UINT32 DstFormat,
+ UINT32 nDstStep, UINT32 nXDst, UINT32 nYDst,
+ UINT32 nDstWidth, UINT32 nDstHeight,
+ const gdiPalette* palette)
{
UINT32 scanline;
UINT32 SrcFormat;
{
case 24:
scanline = nSrcWidth * 3;
- SrcFormat = PIXEL_FORMAT_BGR24_VF;
+ SrcFormat = PIXEL_FORMAT_BGR24;
break;
case 16:
scanline = nSrcWidth * 2;
- SrcFormat = PIXEL_FORMAT_RGB16_VF;
+ SrcFormat = PIXEL_FORMAT_RGB16;
break;
case 15:
scanline = nSrcWidth * 2;
- SrcFormat = PIXEL_FORMAT_RGB15_VF;
+ SrcFormat = PIXEL_FORMAT_RGB15;
break;
case 8:
scanline = nSrcWidth;
- SrcFormat = PIXEL_FORMAT_RGB8_VF;
+ SrcFormat = PIXEL_FORMAT_RGB8;
break;
default:
if (BufferSize > interleaved->TempSize)
{
interleaved->TempBuffer = _aligned_realloc(
- interleaved->TempBuffer,
- BufferSize, 16);
+ interleaved->TempBuffer,
+ BufferSize, 16);
interleaved->TempSize = BufferSize;
}
{
case 24:
RleDecompress24to24(pSrcData, SrcSize, interleaved->TempBuffer,
- scanline, nSrcWidth, nSrcHeight);
+ scanline, nSrcWidth, nSrcHeight);
break;
case 16:
case 15:
RleDecompress16to16(pSrcData, SrcSize, interleaved->TempBuffer,
- scanline, nSrcWidth, nSrcHeight);
+ scanline, nSrcWidth, nSrcHeight);
break;
case 8:
RleDecompress8to8(pSrcData, SrcSize, interleaved->TempBuffer,
- scanline, nSrcWidth, nSrcHeight);
+ scanline, nSrcWidth, nSrcHeight);
break;
default:
}
return freerdp_image_copy(pDstData, DstFormat, nDstStep, nXDst, nYDst,
- nDstWidth, nDstHeight, interleaved->TempBuffer,
- SrcFormat, scanline, 0, 0, palette);
+ nDstWidth, nDstHeight, interleaved->TempBuffer,
+ SrcFormat, scanline, 0, 0, palette, FREERDP_FLIP_VERTICAL);
}
BOOL interleaved_compress(BITMAP_INTERLEAVED_CONTEXT* interleaved,
- BYTE* pDstData, UINT32* pDstSize,
- UINT32 nWidth, UINT32 nHeight,
- const BYTE* pSrcData, UINT32 SrcFormat,
- UINT32 nSrcStep, UINT32 nXSrc, UINT32 nYSrc,
- const gdiPalette* palette, UINT32 bpp)
+ BYTE* pDstData, UINT32* pDstSize,
+ UINT32 nWidth, UINT32 nHeight,
+ const BYTE* pSrcData, UINT32 SrcFormat,
+ UINT32 nSrcStep, UINT32 nXSrc, UINT32 nYSrc,
+ const gdiPalette* palette, UINT32 bpp)
{
int status;
wStream* s;
if ((nWidth > 64) || (nHeight > 64))
{
WLog_ERR(TAG,
- "interleaved_compress: width (%d) or height (%d) is greater than 64", nWidth,
- nHeight);
+ "interleaved_compress: width (%d) or height (%d) is greater than 64", nWidth,
+ nHeight);
return FALSE;
}
return FALSE;
status = freerdp_image_copy(interleaved->TempBuffer, DstFormat, 0, 0, 0, nWidth,
- nHeight,
- pSrcData, SrcFormat, nSrcStep, nXSrc, nYSrc, palette);
+ nHeight,
+ pSrcData, SrcFormat, nSrcStep, nXSrc, nYSrc, palette, FREERDP_FLIP_NONE);
s = Stream_New(pDstData, maxSize);
if (!s)
return FALSE;
status = freerdp_bitmap_compress((char*) interleaved->TempBuffer, nWidth,
- nHeight,
- s, bpp, maxSize, nHeight - 1, interleaved->bts, 0);
+ nHeight,
+ s, bpp, maxSize, nHeight - 1, interleaved->bts, 0);
Stream_SealLength(s);
*pDstSize = (UINT32) Stream_Length(s);
Stream_Free(s, FALSE);
{
BITMAP_INTERLEAVED_CONTEXT* interleaved;
interleaved = (BITMAP_INTERLEAVED_CONTEXT*) calloc(1,
- sizeof(BITMAP_INTERLEAVED_CONTEXT));
+ sizeof(BITMAP_INTERLEAVED_CONTEXT));
if (interleaved)
{
UINT16 y;
UINT16 rw = ROUND_UP_TO(context->width, 8);
BYTE shift = context->ColorLossLevel - 1; /* colorloss recovery + YCoCg shift */;
-
BYTE* bmpdata = context->BitmapData;
for (y = 0; y < context->height; y++)
{
yplane = context->priv->PlaneBuffers[0] + y * rw; /* Y */
coplane = context->priv->PlaneBuffers[1] + (y >> 1) * (rw >>
- 1); /* Co, supersampled */
+ 1); /* Co, supersampled */
cgplane = context->priv->PlaneBuffers[2] + (y >> 1) * (rw >>
- 1); /* Cg, supersampled */
+ 1); /* Cg, supersampled */
}
else
{
INT16 r_val = y_val + co_val - cg_val;
INT16 g_val = y_val + cg_val;
INT16 b_val = y_val - co_val - cg_val;
-
*bmpdata++ = MINMAX(b_val, 0, 0xFF);
*bmpdata++ = MINMAX(g_val, 0, 0xFF);
*bmpdata++ = MINMAX(r_val, 0, 0xFF);
Stream_Read_UINT8(s, context->ColorLossLevel); /* ColorLossLevel (1 byte) */
Stream_Read_UINT8(s,
- context->ChromaSubsamplingLevel); /* ChromaSubsamplingLevel (1 byte) */
+ context->ChromaSubsamplingLevel); /* ChromaSubsamplingLevel (1 byte) */
Stream_Seek(s, 2); /* Reserved (2 bytes) */
context->Planes = Stream_Pointer(s);
return TRUE;
goto error_PlanePool;
PROFILER_CREATE(context->priv->prof_nsc_rle_decompress_data,
- "nsc_rle_decompress_data");
+ "nsc_rle_decompress_data");
PROFILER_CREATE(context->priv->prof_nsc_decode, "nsc_decode");
PROFILER_CREATE(context->priv->prof_nsc_rle_compress_data,
- "nsc_rle_compress_data");
+ "nsc_rle_compress_data");
PROFILER_CREATE(context->priv->prof_nsc_encode, "nsc_encode");
/* Default encoding parameters */
context->ColorLossLevel = 3;
}
BOOL nsc_process_message(NSC_CONTEXT* context, UINT16 bpp,
- UINT32 width, UINT32 height,
- const BYTE* data, UINT32 length,
- BYTE* pDstData, UINT32 DstFormat,
- UINT32 nDstStride,
- UINT32 nXDst, UINT32 nYDst, UINT32 nWidth,
- UINT32 nHeight)
+ UINT32 width, UINT32 height,
+ const BYTE* data, UINT32 length,
+ BYTE* pDstData, UINT32 DstFormat,
+ UINT32 nDstStride,
+ UINT32 nXDst, UINT32 nYDst, UINT32 nWidth,
+ UINT32 nHeight, UINT32 flip)
{
wStream* s;
BOOL ret;
PROFILER_EXIT(context->priv->prof_nsc_decode);
if (!freerdp_image_copy(pDstData, DstFormat, nDstStride, nXDst, nYDst,
- width, height, context->BitmapData,
- PIXEL_FORMAT_BGRA32, 0, 0, 0, NULL))
+ width, height, context->BitmapData,
+ PIXEL_FORMAT_BGRA32, 0, 0, 0, NULL, flip))
return FALSE;
return TRUE;
{
if (!freerdp_image_copy(pDstData, DstFormat, nDstStep, nXDst, nYDst, w,
h, pTempData,
- TempFormat, nTempStep, nXDst, nYDst, NULL))
+ TempFormat, nTempStep, nXDst, nYDst, NULL, FREERDP_FLIP_NONE))
return FALSE;
}
}
rect->left, rect->top,
width, height,
tile->data, PIXEL_FORMAT_BGRX32,
- 64 * 4, nXSrc, nYSrc, NULL))
+ 64 * 4, nXSrc, nYSrc, NULL, FREERDP_FLIP_NONE))
{
rc = -42;
break;
if (!freerdp_image_copy(dst, dstFormat, dstStride,
nXDst, nYDst, nWidth, nHeight,
- tile->data, format, stride, nXSrc, nYSrc, NULL))
+ tile->data, format, stride, nXSrc, nYSrc, NULL, FREERDP_FLIP_NONE))
goto fail;
if (invalidRegion)
return (void*) ptr;
}
-static int test_image_fill(BYTE* pDstData, int nDstStep, int nXDst, int nYDst, int nWidth, int nHeight, UINT32 color)
+static int test_image_fill(BYTE* pDstData, int nDstStep, int nXDst, int nYDst, int nWidth,
+ int nHeight, UINT32 color)
{
int y;
UINT32* pDstPixel;
return 1;
}
-static int test_image_fill_quarter(BYTE* pDstData, int nDstStep, int nWidth, int nHeight, UINT32 color, int quarter)
+static int test_image_fill_quarter(BYTE* pDstData, int nDstStep, int nWidth, int nHeight,
+ UINT32 color, int quarter)
{
int x = 0;
int y = 0;
x = 0;
y = 0;
width = nWidth / 2;
- height = nHeight /2;
+ height = nHeight / 2;
break;
case 1:
x = nWidth / 2;
y = nHeight / 2;
width = nWidth / 2;
- height = nHeight /2;
+ height = nHeight / 2;
break;
case 2:
x = 0;
y = nHeight / 2;
width = nWidth / 2;
- height = nHeight /2;
+ height = nHeight / 2;
break;
case 3:
x = nWidth / 2;
y = 0;
width = nWidth / 2;
- height = nHeight /2;
+ height = nHeight / 2;
break;
}
test_image_fill(pDstData, nDstStep, x, y, width, height, 0xFF000000);
-
return 1;
}
-static int test_image_fill_unused_quarters(BYTE* pDstData, int nDstStep, int nWidth, int nHeight, UINT32 color, int quarter)
+static int test_image_fill_unused_quarters(BYTE* pDstData, int nDstStep, int nWidth, int nHeight,
+ UINT32 color, int quarter)
{
return 1;
FILE* fp;
BYTE* buffer;
char* filename;
-
filename = GetCombinedPath(path, file);
+
if (!filename)
return NULL;
fseek(fp, 0, SEEK_END);
*size = ftell(fp);
fseek(fp, 0, SEEK_SET);
-
buffer = (BYTE*) malloc(*size);
if (!buffer)
}
fclose(fp);
-
return buffer;
}
int imageNo = 0;
int quarterNo = 0;
int passNo = 0;
-
/* image 1 */
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_0_0_025_sampleimage1.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_0_0_025_sampleimage1.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_0_0_050_sampleimage1.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_0_0_050_sampleimage1.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_0_0_075_sampleimage1.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_0_0_075_sampleimage1.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_0_0_100_sampleimage1.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_0_0_100_sampleimage1.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
quarterNo = (quarterNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_0_1_025_sampleimage1.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_0_1_025_sampleimage1.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_0_1_050_sampleimage1.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_0_1_050_sampleimage1.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_0_1_075_sampleimage1.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_0_1_075_sampleimage1.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_0_1_100_sampleimage1.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_0_1_100_sampleimage1.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
quarterNo = (quarterNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_0_2_025_sampleimage1.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_0_2_025_sampleimage1.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_0_2_050_sampleimage1.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_0_2_050_sampleimage1.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_0_2_075_sampleimage1.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_0_2_075_sampleimage1.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_0_2_100_sampleimage1.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_0_2_100_sampleimage1.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
quarterNo = (quarterNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_0_3_025_sampleimage1.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_0_3_025_sampleimage1.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_0_3_050_sampleimage1.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_0_3_050_sampleimage1.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_0_3_075_sampleimage1.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_0_3_075_sampleimage1.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_0_3_100_sampleimage1.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_0_3_100_sampleimage1.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
imageNo++;
-
/* image 2 */
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_1_0_025_sampleimage2.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_1_0_025_sampleimage2.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_1_0_050_sampleimage2.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_1_0_050_sampleimage2.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_1_0_075_sampleimage2.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_1_0_075_sampleimage2.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_1_0_100_sampleimage2.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_1_0_100_sampleimage2.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
quarterNo = (quarterNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_1_1_025_sampleimage2.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_1_1_025_sampleimage2.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_1_1_050_sampleimage2.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_1_1_050_sampleimage2.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_1_1_075_sampleimage2.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_1_1_075_sampleimage2.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_1_1_100_sampleimage2.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_1_1_100_sampleimage2.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
quarterNo = (quarterNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_1_2_025_sampleimage2.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_1_2_025_sampleimage2.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_1_2_050_sampleimage2.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_1_2_050_sampleimage2.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_1_2_075_sampleimage2.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_1_2_075_sampleimage2.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_1_2_100_sampleimage2.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_1_2_100_sampleimage2.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
quarterNo = (quarterNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_1_3_025_sampleimage2.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_1_3_025_sampleimage2.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_1_3_050_sampleimage2.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_1_3_050_sampleimage2.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_1_3_075_sampleimage2.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_1_3_075_sampleimage2.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_1_3_100_sampleimage2.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_1_3_100_sampleimage2.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
imageNo++;
-
/* image 3 */
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_2_0_025_sampleimage3.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_2_0_025_sampleimage3.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_2_0_050_sampleimage3.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_2_0_050_sampleimage3.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_2_0_075_sampleimage3.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_2_0_075_sampleimage3.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_2_0_100_sampleimage3.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_2_0_100_sampleimage3.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
quarterNo = (quarterNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_2_1_025_sampleimage3.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_2_1_025_sampleimage3.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_2_1_050_sampleimage3.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_2_1_050_sampleimage3.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_2_1_075_sampleimage3.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_2_1_075_sampleimage3.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_2_1_100_sampleimage3.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_2_1_100_sampleimage3.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
quarterNo = (quarterNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_2_2_025_sampleimage3.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_2_2_025_sampleimage3.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_2_2_050_sampleimage3.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_2_2_050_sampleimage3.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_2_2_075_sampleimage3.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_2_2_075_sampleimage3.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_2_2_100_sampleimage3.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_2_2_100_sampleimage3.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
quarterNo = (quarterNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_2_3_025_sampleimage3.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_2_3_025_sampleimage3.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_2_3_050_sampleimage3.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_2_3_050_sampleimage3.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_2_3_075_sampleimage3.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_2_3_075_sampleimage3.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
-
files[imageNo][quarterNo][passNo].buffer = test_progressive_load_file(ms_sample_path,
- "compress/enc_2_3_100_sampleimage3.bin", &(files[imageNo][quarterNo][passNo].size));
+ "compress/enc_2_3_100_sampleimage3.bin", &(files[imageNo][quarterNo][passNo].size));
passNo = (passNo + 1) % 4;
/* check if all test data has been loaded */
BYTE* buffer;
wImage* image;
char* filename;
-
filename = GetCombinedPath(path, file);
if (!filename)
buffer = image->data;
*size = image->height * image->scanline;
-
test_fill_image_alpha_channel(image->data, image->width, image->height, 0xFF);
- test_image_fill_unused_quarters(image->data, image->scanline, image->width, image->height, quarter, 0xFF000000);
-
+ test_image_fill_unused_quarters(image->data, image->scanline, image->width, image->height, quarter,
+ 0xFF000000);
winpr_image_free(image, FALSE);
free(filename);
-
return buffer;
}
int imageNo = 0;
int quarterNo = 0;
int passNo = 0;
-
/* image 1 */
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_0_0_025_sampleimage1.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_0_0_025_sampleimage1.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_0_0_050_sampleimage1.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_0_0_050_sampleimage1.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_0_0_075_sampleimage1.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_0_0_075_sampleimage1.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_0_0_100_sampleimage1.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_0_0_100_sampleimage1.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
quarterNo = (quarterNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_0_1_025_sampleimage1.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_0_1_025_sampleimage1.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_0_1_050_sampleimage1.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_0_1_050_sampleimage1.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_0_1_075_sampleimage1.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_0_1_075_sampleimage1.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_0_1_100_sampleimage1.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_0_1_100_sampleimage1.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
quarterNo = (quarterNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_0_2_025_sampleimage1.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_0_2_025_sampleimage1.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_0_2_050_sampleimage1.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_0_2_050_sampleimage1.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_0_2_075_sampleimage1.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_0_2_075_sampleimage1.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_0_2_100_sampleimage1.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_0_2_100_sampleimage1.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
quarterNo = (quarterNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_0_3_025_sampleimage1.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_0_3_025_sampleimage1.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_0_3_050_sampleimage1.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_0_3_050_sampleimage1.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_0_3_075_sampleimage1.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_0_3_075_sampleimage1.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_0_3_100_sampleimage1.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_0_3_100_sampleimage1.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
imageNo++;
-
/* image 2 */
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_1_0_025_sampleimage2.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_1_0_025_sampleimage2.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_1_0_050_sampleimage2.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_1_0_050_sampleimage2.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_1_0_075_sampleimage2.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_1_0_075_sampleimage2.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_1_0_100_sampleimage2.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_1_0_100_sampleimage2.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
quarterNo = (quarterNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_1_1_025_sampleimage2.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_1_1_025_sampleimage2.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_1_1_050_sampleimage2.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_1_1_050_sampleimage2.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_1_1_075_sampleimage2.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_1_1_075_sampleimage2.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_1_1_100_sampleimage2.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_1_1_100_sampleimage2.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
quarterNo = (quarterNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_1_2_025_sampleimage2.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_1_2_025_sampleimage2.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_1_2_050_sampleimage2.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_1_2_050_sampleimage2.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_1_2_075_sampleimage2.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_1_2_075_sampleimage2.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_1_2_100_sampleimage2.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_1_2_100_sampleimage2.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
quarterNo = (quarterNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_1_3_025_sampleimage2.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_1_3_025_sampleimage2.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_1_3_050_sampleimage2.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_1_3_050_sampleimage2.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_1_3_075_sampleimage2.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_1_3_075_sampleimage2.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_1_3_100_sampleimage2.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_1_3_100_sampleimage2.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
imageNo++;
-
/* image 3 */
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_2_0_025_sampleimage3.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_2_0_025_sampleimage3.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_2_0_050_sampleimage3.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_2_0_050_sampleimage3.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_2_0_075_sampleimage3.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_2_0_075_sampleimage3.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_2_0_100_sampleimage3.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_2_0_100_sampleimage3.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
quarterNo = (quarterNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_2_1_025_sampleimage3.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_2_1_025_sampleimage3.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_2_1_050_sampleimage3.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_2_1_050_sampleimage3.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_2_1_075_sampleimage3.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_2_1_075_sampleimage3.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_2_1_100_sampleimage3.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_2_1_100_sampleimage3.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
quarterNo = (quarterNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_2_2_025_sampleimage3.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_2_2_025_sampleimage3.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_2_2_050_sampleimage3.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_2_2_050_sampleimage3.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_2_2_075_sampleimage3.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_2_2_075_sampleimage3.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_2_2_100_sampleimage3.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_2_2_100_sampleimage3.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
quarterNo = (quarterNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_2_3_025_sampleimage3.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_2_3_025_sampleimage3.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_2_3_050_sampleimage3.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_2_3_050_sampleimage3.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_2_3_075_sampleimage3.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_2_3_075_sampleimage3.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
-
bitmaps[imageNo][quarterNo][passNo].buffer = test_progressive_load_bitmap(ms_sample_path,
- "decompress/dec_2_3_100_sampleimage3.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
+ "decompress/dec_2_3_100_sampleimage3.bmp", &(bitmaps[imageNo][quarterNo][passNo].size), quarterNo);
passNo = (passNo + 1) % 4;
/* check if all test data has been loaded */
return count;
}
-static int test_progressive_decode(PROGRESSIVE_CONTEXT* progressive, EGFX_SAMPLE_FILE files[4], EGFX_SAMPLE_FILE bitmaps[4], int quarter, int count)
+static int test_progressive_decode(PROGRESSIVE_CONTEXT* progressive, EGFX_SAMPLE_FILE files[4],
+ EGFX_SAMPLE_FILE bitmaps[4], int quarter, int count)
{
int cnt;
int pass;
RECTANGLE_16 clippingRect;
RFX_PROGRESSIVE_TILE* tile;
PROGRESSIVE_BLOCK_REGION* region;
-
clippingRect.left = 0;
clippingRect.top = 0;
clippingRect.right = g_Width;
for (pass = 0; pass < count; pass++)
{
status = progressive_decompress(progressive, files[pass].buffer, files[pass].size,
- g_DstData, PIXEL_FORMAT_XRGB32, g_DstStep, 0, 0, g_Width, g_Height, 0);
-
+ g_DstData, PIXEL_FORMAT_XRGB32, g_DstStep, 0, 0, g_Width, g_Height, 0);
printf("ProgressiveDecompress: status: %d pass: %d\n", status, pass + 1);
-
region = &(progressive->region);
switch (quarter)
clippingRect.left = 0;
clippingRect.top = 0;
clippingRect.right = g_Width / 2;
- clippingRect.bottom = g_Height /2;
+ clippingRect.bottom = g_Height / 2;
break;
case 1:
for (index = 0; index < region->numTiles; index++)
{
tile = region->tiles[index];
-
tileRect.left = tile->x;
tileRect.top = tile->y;
tileRect.right = tile->x + tile->width;
tileRect.bottom = tile->y + tile->height;
-
rectangles_intersection(&tileRect, &clippingRect, &updateRect);
-
nXDst = updateRect.left;
nYDst = updateRect.top;
nWidth = updateRect.right - updateRect.left;
nXSrc = nXDst - tile->x;
nYSrc = nYDst - tile->y;
-
freerdp_image_copy(g_DstData, PIXEL_FORMAT_XRGB32, g_DstStep,
- nXDst, nYDst, nWidth, nHeight, tile->data,
- PIXEL_FORMAT_XRGB32, 64 * 4, nXSrc, nYSrc, NULL);
+ nXDst, nYDst, nWidth, nHeight, tile->data,
+ PIXEL_FORMAT_XRGB32, 64 * 4, nXSrc, nYSrc, NULL, FREERDP_FLIP_NONE);
}
size = bitmaps[pass].size;
EGFX_SAMPLE_FILE files[3][4][4];
EGFX_SAMPLE_FILE bitmaps[3][4][4];
PROGRESSIVE_CONTEXT* progressive;
-
g_Width = 1920;
g_Height = 1080;
g_DstStep = g_Width * 4;
-
ZeroMemory(files, sizeof(files));
ZeroMemory(bitmaps, sizeof(bitmaps));
-
status = test_progressive_load_files(ms_sample_path, files);
if (status < 0)
{
- for(i=0; i<3; i++)
+ for (i = 0; i < 3; i++)
{
- for (j=0; j<4; j++)
+ for (j = 0; j < 4; j++)
{
- for (k=0; k<4; k++)
+ for (k = 0; k < 4; k++)
sample_file_free(&files[i][j][k]);
}
}
if (status < 0)
{
- for(i=0; i<3; i++)
+ for (i = 0; i < 3; i++)
{
- for (j=0; j<4; j++)
+ for (j = 0; j < 4; j++)
{
- for (k=0; k<4; k++)
+ for (k = 0; k < 4; k++)
sample_file_free(&files[i][j][k]);
}
}
}
count = 4;
-
progressive = progressive_context_new(FALSE);
-
g_DstData = _aligned_malloc(g_DstStep * g_Height, 16);
-
progressive_create_surface_context(progressive, 0, g_Width, g_Height);
/* image 1 */
progressive_context_free(progressive);
- for(i=0; i<3; i++)
+ for (i = 0; i < 3; i++)
{
- for (j=0; j<4; j++)
+ for (j = 0; j < 4; j++)
{
- for (k=0; k<4; k++)
+ for (k = 0; k < 4; k++)
{
- sample_file_free(&bitmaps[i][j][k]);
- sample_file_free(&files[i][j][k]);
+ sample_file_free(&bitmaps[i][j][k]);
+ sample_file_free(&files[i][j][k]);
}
}
}
_aligned_free(g_DstData);
-
return 0;
}
int TestFreeRDPCodecProgressive(int argc, char* argv[])
{
char* ms_sample_path;
-
ms_sample_path = GetKnownSubPath(KNOWN_PATH_TEMP, "EGFX_PROGRESSIVE_MS_SAMPLE");
+
if (!ms_sample_path)
{
printf("Memory allocation failed\n");
return test_progressive_ms_sample(ms_sample_path);
free(ms_sample_path);
-
return 0;
}
if (!freerdp_image_copy(hDstBmp->data, hdcDest->format, hDstBmp->scanline,
nXDest, nYDest, nWidth, nHeight,
- hSrcBmp->data, hdcSrc->format, hSrcBmp->scanline, nXSrc, nYSrc, palette))
+ hSrcBmp->data, hdcSrc->format, hSrcBmp->scanline, nXSrc, nYSrc, palette, FREERDP_FLIP_NONE))
return FALSE;
break;
if (!freerdp_image_copy(hDstBmp->data, hdcDest->format, hDstBmp->scanline,
nXDest, nYDest, nWidth, nHeight,
- hSrcBmp->data, hdcSrc->format, hSrcBmp->scanline, nXSrc, nYSrc, palette))
+ hSrcBmp->data, hdcSrc->format, hSrcBmp->scanline, nXSrc, nYSrc, palette, FREERDP_FLIP_NONE))
return FALSE;
break;
INLINE BOOL gdi_decode_color(rdpGdi* gdi, const UINT32 srcColor,
UINT32* color, UINT32* format)
{
- UINT32 SrcFormat = gdi_get_pixel_format(gdi->context->settings->ColorDepth,
- FALSE);
+ UINT32 SrcFormat = gdi_get_pixel_format(gdi->context->settings->ColorDepth);
if (format)
*format = SrcFormat;
return rop3_code_table[code];
}
-UINT32 gdi_get_pixel_format(UINT32 bitsPerPixel, BOOL vFlip)
+UINT32 gdi_get_pixel_format(UINT32 bitsPerPixel)
{
- UINT32 format = PIXEL_FORMAT_XBGR32_VF;
+ UINT32 format = PIXEL_FORMAT_XBGR32;
switch (bitsPerPixel)
{
case 32:
- format = vFlip ? PIXEL_FORMAT_ABGR32_VF : PIXEL_FORMAT_ABGR32;
+ format = PIXEL_FORMAT_ABGR32;
break;
case 24:
- format = vFlip ? PIXEL_FORMAT_BGR24_VF : PIXEL_FORMAT_BGR24;
+ format = PIXEL_FORMAT_BGR24;
break;
case 16:
- format = vFlip ? PIXEL_FORMAT_RGB16_VF : PIXEL_FORMAT_RGB16;
+ format = PIXEL_FORMAT_RGB16;
break;
case 15:
- format = vFlip ? PIXEL_FORMAT_RGB15_VF : PIXEL_FORMAT_RGB15;
+ format = PIXEL_FORMAT_RGB15;
break;
case 8:
- format = vFlip ? PIXEL_FORMAT_RGB8_VF : PIXEL_FORMAT_RGB8;
+ format = PIXEL_FORMAT_RGB8;
break;
}
if (brush->bpp > 1)
{
- brushFormat = gdi_get_pixel_format(brush->bpp, FALSE);
+ brushFormat = gdi_get_pixel_format(brush->bpp);
if (!freerdp_image_copy(data, gdi->drawing->hdc->format, 0, 0, 0,
8, 8, brush->data, brushFormat, 0, 0, 0,
- &gdi->palette))
+ &gdi->palette, FREERDP_FLIP_NONE))
goto out_error;
}
else
if (brush->bpp > 1)
{
- brushFormat = gdi_get_pixel_format(brush->bpp, FALSE);
+ brushFormat = gdi_get_pixel_format(brush->bpp);
if (!freerdp_image_copy(data, gdi->drawing->hdc->format, 0, 0, 0,
8, 8, brush->data, brushFormat,
- 0, 0, 0, &gdi->palette))
+ 0, 0, 0, &gdi->palette, FREERDP_FLIP_NONE))
{
ret = FALSE;
_aligned_free(data);
break;
case RDP_CODEC_ID_NSCODEC:
- format = FREERDP_VFLIP_PIXEL_FORMAT(gdi->dstFormat);
+ format = gdi->dstFormat;
if (!nsc_process_message(context->codecs->nsc, cmd->bpp, cmd->width,
cmd->height, cmd->bitmapData,
cmd->bitmapDataLength, gdi->primary_buffer,
format, gdi->stride, cmd->destLeft, cmd->destTop,
- cmd->width, cmd->height))
+ cmd->width, cmd->height, FREERDP_FLIP_VERTICAL))
return FALSE;
break;
case RDP_CODEC_ID_NONE:
- format = PIXEL_FORMAT_BGRX32_VF;
+ format = PIXEL_FORMAT_BGRX32;
if (!freerdp_image_copy(gdi->primary_buffer, gdi->dstFormat, gdi->stride,
cmd->destLeft, cmd->destTop, cmd->width, cmd->height,
cmd->bitmapData, format, 0, 0, 0,
- &gdi->palette))
+ &gdi->palette, FREERDP_FLIP_VERTICAL))
return FALSE;
break;
BOOL gdi_init_ex(freerdp* instance, UINT32 format, UINT32 stride, BYTE* buffer,
void (*pfree)(void*))
{
- UINT32 SrcFormat = gdi_get_pixel_format(instance->settings->ColorDepth, FALSE);
+ UINT32 SrcFormat = gdi_get_pixel_format(instance->settings->ColorDepth);
rdpGdi* gdi = (rdpGdi*) calloc(1, sizeof(rdpGdi));
rdpContext* context = instance->context;
gdi->stride,
nXDst, nYDst, width, height,
surface->data, surface->format,
- surface->scanline, nXSrc, nYSrc, NULL))
+ surface->scanline, nXSrc, nYSrc, NULL, FREERDP_FLIP_NONE))
return CHANNEL_RC_NULL_DATA;
gdi_InvalidateRegion(gdi->primary->hdc, nXDst, nYDst, width, height);
if (!freerdp_image_copy(surface->data, surface->format, surface->scanline,
cmd->left, cmd->top, cmd->width, cmd->height,
- cmd->data, cmd->format, 0, 0, 0, NULL))
+ cmd->data, cmd->format, 0, 0, 0, NULL, FREERDP_FLIP_NONE))
return ERROR_INTERNAL_ERROR;
invalidRect.left = cmd->left;
destPt->x, destPt->y, nWidth, nHeight,
surfaceSrc->data, surfaceSrc->format,
surfaceSrc->scanline,
- rectSrc->left, rectSrc->top, NULL);
+ rectSrc->left, rectSrc->top, NULL, FREERDP_FLIP_NONE);
invalidRect.left = destPt->x;
invalidRect.top = destPt->y;
invalidRect.right = destPt->x + rectSrc->right;
freerdp_image_copy(cacheEntry->data, cacheEntry->format, cacheEntry->scanline,
0, 0, cacheEntry->width, cacheEntry->height, surface->data,
- surface->format, surface->scanline, rect->left, rect->top, NULL);
+ surface->format, surface->scanline, rect->left, rect->top, NULL, FREERDP_FLIP_NONE);
context->SetCacheSlotData(context, surfaceToCache->cacheSlot,
(void*) cacheEntry);
return CHANNEL_RC_OK;
destPt = &cacheToSurface->destPts[index];
freerdp_image_copy(surface->data, surface->format, surface->scanline,
destPt->x, destPt->y, cacheEntry->width, cacheEntry->height,
- cacheEntry->data, cacheEntry->format, cacheEntry->scanline, 0, 0, NULL);
+ cacheEntry->data, cacheEntry->format, cacheEntry->scanline, 0, 0, NULL, FREERDP_FLIP_NONE);
invalidRect.left = destPt->x;
invalidRect.top = destPt->y;
invalidRect.right = destPt->x + cacheEntry->width - 1;
/* Bitmap Class */
HGDI_BITMAP gdi_create_bitmap(rdpGdi* gdi, UINT32 nWidth, UINT32 nHeight,
- UINT32 SrcFormat, BYTE* data)
+ UINT32 SrcFormat, BYTE* data)
{
UINT32 nSrcStep;
UINT32 nDstStep;
nSrcStep = nWidth * GetBytesPerPixel(SrcFormat);
if (!freerdp_image_copy(pDstData, gdi->dstFormat, nDstStep, 0, 0,
- nWidth, nHeight, pSrcData, SrcFormat, nSrcStep, 0, 0,
- &gdi->palette))
+ nWidth, nHeight, pSrcData, SrcFormat, nSrcStep, 0, 0,
+ &gdi->palette, FREERDP_FLIP_NONE))
{
_aligned_free(pDstData);
return NULL;
if (!bitmap->data)
gdi_bitmap->bitmap = gdi_CreateCompatibleBitmap(
- gdi->hdc, bitmap->width,
- bitmap->height);
+ gdi->hdc, bitmap->width,
+ bitmap->height);
else
{
UINT32 format = bitmap->format;
gdi_bitmap->bitmap = gdi_create_bitmap(gdi, bitmap->width,
- bitmap->height,
- format, bitmap->data);
+ bitmap->height,
+ format, bitmap->data);
}
if (!gdi_bitmap->bitmap)
UINT32 width = bitmap->right - bitmap->left + 1;
UINT32 height = bitmap->bottom - bitmap->top + 1;
return gdi_BitBlt(context->gdi->primary->hdc,
- bitmap->left, bitmap->top,
- width, height, gdi_bitmap->hdc,
- 0, 0, GDI_SRCCOPY, &context->gdi->palette);
+ bitmap->left, bitmap->top,
+ width, height, gdi_bitmap->hdc,
+ 0, 0, GDI_SRCCOPY, &context->gdi->palette);
}
static BOOL gdi_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap,
- const BYTE* pSrcData, UINT32 DstWidth, UINT32 DstHeight,
- UINT32 bpp, UINT32 length, BOOL compressed,
- UINT32 codecId)
+ const BYTE* pSrcData, UINT32 DstWidth, UINT32 DstHeight,
+ UINT32 bpp, UINT32 length, BOOL compressed,
+ UINT32 codecId)
{
UINT32 SrcSize = length;
UINT32 SrcFormat;
UINT32 bytesPerPixel;
rdpGdi* gdi = context->gdi;
-
bitmap->compressed = FALSE;
bitmap->format = gdi->dstFormat;
bitmap->length = DstWidth * DstHeight * GetBytesPerPixel(bitmap->format);
-
bytesPerPixel = GetBytesPerPixel(bpp);
bitmap->data = (BYTE*) _aligned_malloc(bitmap->length, 16);
if (bpp < 32)
{
if (!interleaved_decompress(context->codecs->interleaved,
- pSrcData, SrcSize,
- DstWidth, DstHeight,
- bpp,
- bitmap->data, bitmap->format,
- 0, 0, 0, DstWidth, DstHeight,
- &gdi->palette))
+ pSrcData, SrcSize,
+ DstWidth, DstHeight,
+ bpp,
+ bitmap->data, bitmap->format,
+ 0, 0, 0, DstWidth, DstHeight,
+ &gdi->palette))
return FALSE;
}
else
{
if (!planar_decompress(context->codecs->planar, pSrcData, SrcSize,
- DstWidth, DstHeight,
- bitmap->data, bitmap->format, 0, 0, 0,
- DstWidth, DstHeight, TRUE))
+ DstWidth, DstHeight,
+ bitmap->data, bitmap->format, 0, 0, 0,
+ DstWidth, DstHeight, TRUE))
return FALSE;
}
}
else
{
- SrcFormat = gdi_get_pixel_format(bpp, TRUE);
+ SrcFormat = gdi_get_pixel_format(bpp);
if (!freerdp_image_copy(bitmap->data, bitmap->format, 0, 0, 0,
- DstWidth, DstHeight, pSrcData, SrcFormat,
- 0, 0, 0, &gdi->palette))
+ DstWidth, DstHeight, pSrcData, SrcFormat,
+ 0, 0, 0, &gdi->palette, FREERDP_FLIP_VERTICAL))
return FALSE;
}
}
static BOOL gdi_Bitmap_SetSurface(rdpContext* context, rdpBitmap* bitmap,
- BOOL primary)
+ BOOL primary)
{
rdpGdi* gdi = context->gdi;
}
gdi_glyph->bitmap = gdi_CreateBitmap(glyph->cx, glyph->cy, PIXEL_FORMAT_MONO,
- data);
+ data);
if (!gdi_glyph->bitmap)
{
}
static BOOL gdi_Glyph_Draw(rdpContext* context, const rdpGlyph* glyph, UINT32 x,
- UINT32 y, UINT32 w, UINT32 h, UINT32 sx, UINT32 sy, BOOL fOpRedundant)
+ UINT32 y, UINT32 w, UINT32 h, UINT32 sx, UINT32 sy, BOOL fOpRedundant)
{
gdiGlyph* gdi_glyph;
rdpGdi* gdi;
gdi_SelectObject(gdi->drawing->hdc, (HGDIOBJECT)brush);
rc = gdi_BitBlt(gdi->drawing->hdc, x, y, w, h, gdi_glyph->hdc, sx, sy,
- GDI_GLYPH_ORDER, &context->gdi->palette);
+ GDI_GLYPH_ORDER, &context->gdi->palette);
gdi_DeleteObject((HGDIOBJECT)brush);
return rc;
}
static BOOL gdi_Glyph_BeginDraw(rdpContext* context, UINT32 x, UINT32 y,
- UINT32 width, UINT32 height, UINT32 bgcolor,
- UINT32 fgcolor, BOOL fOpRedundant)
+ UINT32 width, UINT32 height, UINT32 bgcolor,
+ UINT32 fgcolor, BOOL fOpRedundant)
{
rdpGdi* gdi;
}
static BOOL gdi_Glyph_EndDraw(rdpContext* context, UINT32 x, UINT32 y,
- UINT32 width, UINT32 height, UINT32 bgcolor, UINT32 fgcolor)
+ UINT32 width, UINT32 height, UINT32 bgcolor, UINT32 fgcolor)
{
rdpGdi* gdi;
return NULL;
if (!freerdp_image_copy(data, DstFormat, DstStride, xDst, yDst, nWidth, nHeight,
- src, SrcFormat, SrcStride, xSrc, ySrc, hPalette))
+ src, SrcFormat, SrcStride, xSrc, ySrc, hPalette, FREERDP_FLIP_NONE))
{
_aligned_free(data);
return NULL;
typedef struct _SHADOW_PAM_AUTH_INFO SHADOW_PAM_AUTH_INFO;
static int x11_shadow_pam_conv(int num_msg, const struct pam_message** msg,
- struct pam_response** resp, void* appdata_ptr)
+ struct pam_response** resp, void* appdata_ptr)
{
int index;
int pam_status = PAM_BUF_ERR;
appdata = (SHADOW_PAM_AUTH_DATA*) appdata_ptr;
if (!(response = (struct pam_response*) calloc(num_msg,
- sizeof(struct pam_response))))
+ sizeof(struct pam_response))))
return PAM_BUF_ERR;
for (index = 0; index < num_msg; index++)
}
static int x11_shadow_pam_authenticate(x11ShadowSubsystem* subsystem,
- rdpShadowClient* client, const char* user, const char* domain,
- const char* password)
+ rdpShadowClient* client, const char* user, const char* domain,
+ const char* password)
{
int pam_status;
SHADOW_PAM_AUTH_INFO* info;
if (pam_status != PAM_SUCCESS)
{
WLog_ERR(TAG, "pam_authenticate failure: %s", pam_strerror(info->handle,
- pam_status));
+ pam_status));
free(info);
return -1;
}
if (pam_status != PAM_SUCCESS)
{
WLog_ERR(TAG, "pam_acct_mgmt failure: %s", pam_strerror(info->handle,
- pam_status));
+ pam_status));
free(info);
return -1;
}
#endif
static void x11_shadow_input_synchronize_event(x11ShadowSubsystem* subsystem,
- rdpShadowClient* client, UINT32 flags)
+ rdpShadowClient* client, UINT32 flags)
{
}
static void x11_shadow_input_keyboard_event(x11ShadowSubsystem* subsystem,
- rdpShadowClient* client, UINT16 flags, UINT16 code)
+ rdpShadowClient* client, UINT16 flags, UINT16 code)
{
#ifdef WITH_XTEST
DWORD vkcode;
}
static void x11_shadow_input_unicode_keyboard_event(x11ShadowSubsystem*
- subsystem,
- rdpShadowClient* client, UINT16 flags, UINT16 code)
+ subsystem,
+ rdpShadowClient* client, UINT16 flags, UINT16 code)
{
}
static void x11_shadow_input_mouse_event(x11ShadowSubsystem* subsystem,
- rdpShadowClient* client, UINT16 flags, UINT16 x, UINT16 y)
+ rdpShadowClient* client, UINT16 flags, UINT16 x, UINT16 y)
{
#ifdef WITH_XTEST
int button = 0;
}
static void x11_shadow_input_extended_mouse_event(x11ShadowSubsystem* subsystem,
- rdpShadowClient* client, UINT16 flags, UINT16 x, UINT16 y)
+ rdpShadowClient* client, UINT16 flags, UINT16 x, UINT16 y)
{
#ifdef WITH_XTEST
int button = 0;
int count = 0;
int index = 0;
msg = (SHADOW_MSG_OUT_POINTER_POSITION_UPDATE*) calloc(1,
- sizeof(SHADOW_MSG_OUT_POINTER_POSITION_UPDATE));
+ sizeof(SHADOW_MSG_OUT_POINTER_POSITION_UPDATE));
if (!msg)
return -1;
SHADOW_MSG_OUT_POINTER_ALPHA_UPDATE* msg;
UINT32 msgId = SHADOW_MSG_OUT_POINTER_ALPHA_UPDATE_ID;
msg = (SHADOW_MSG_OUT_POINTER_ALPHA_UPDATE*) calloc(1,
- sizeof(SHADOW_MSG_OUT_POINTER_ALPHA_UPDATE));
+ sizeof(SHADOW_MSG_OUT_POINTER_ALPHA_UPDATE));
if (!msg)
return -1;
msg->height = subsystem->cursorHeight;
if (shadow_subsystem_pointer_convert_alpha_pointer_data(subsystem->cursorPixels,
- TRUE,
- msg->width, msg->height, msg) < 0)
+ TRUE,
+ msg->width, msg->height, msg) < 0)
{
free(msg);
return -1;
msg->Free = x11_shadow_message_free;
return shadow_client_boardcast_msg(subsystem->server, NULL, msgId,
- (SHADOW_MSG_OUT*) msg, NULL) ? 1 : -1;
+ (SHADOW_MSG_OUT*) msg, NULL) ? 1 : -1;
}
static int x11_shadow_query_cursor(x11ShadowSubsystem* subsystem, BOOL getImage)
XLockDisplay(subsystem->display);
if (!XQueryPointer(subsystem->display, subsystem->root_window,
- &root, &child, &root_x, &root_y, &win_x, &win_y, &mask))
+ &root, &child, &root_x, &root_y, &win_x, &win_y, &mask))
{
XUnlockDisplay(subsystem->display);
return -1;
}
static int x11_shadow_handle_xevent(x11ShadowSubsystem* subsystem,
- XEvent* xevent)
+ XEvent* xevent)
{
if (xevent->type == MotionNotify)
{
}
static void x11_shadow_validate_region(x11ShadowSubsystem* subsystem, int x,
- int y,
- int width, int height)
+ int y,
+ int width, int height)
{
XRectangle region;
XLockDisplay(subsystem->display);
XFixesSetRegion(subsystem->display, subsystem->xdamage_region, ®ion, 1);
XDamageSubtract(subsystem->display, subsystem->xdamage,
- subsystem->xdamage_region, None);
+ subsystem->xdamage_region, None);
XUnlockDisplay(subsystem->display);
#endif
}
}
static int x11_shadow_error_handler_for_capture(Display* display,
- XErrorEvent* event)
+ XErrorEvent* event)
{
char msg[256];
XGetErrorText(display, event->error_code, (char*) &msg, sizeof(msg));
WLog_ERR(TAG, "X11 error: %s Error code: %x, request code: %x, minor code: %x",
- msg, event->error_code, event->request_code, event->minor_code);
+ msg, event->error_code, event->request_code, event->minor_code);
/* Ignore BAD MATCH error during image capture. Abort in other case */
if (event->error_code != BadMatch)
{
image = subsystem->fb_image;
XCopyArea(subsystem->display, subsystem->root_window, subsystem->fb_pixmap,
- subsystem->xshm_gc, 0, 0, subsystem->width, subsystem->height, 0, 0);
+ subsystem->xshm_gc, 0, 0, subsystem->width, subsystem->height, 0, 0);
status = shadow_capture_compare(surface->data, surface->scanline,
- surface->width, surface->height,
- (BYTE*) & (image->data[surface->width * 4]), image->bytes_per_line,
- &invalidRect);
+ surface->width, surface->height,
+ (BYTE*) & (image->data[surface->width * 4]), image->bytes_per_line,
+ &invalidRect);
}
else
{
image = XGetImage(subsystem->display, subsystem->root_window,
- surface->x, surface->y, surface->width, surface->height, AllPlanes, ZPixmap);
+ surface->x, surface->y, surface->width, surface->height, AllPlanes, ZPixmap);
if (!image)
{
}
status = shadow_capture_compare(surface->data, surface->scanline,
- surface->width, surface->height,
- (BYTE*) image->data, image->bytes_per_line, &invalidRect);
+ surface->width, surface->height,
+ (BYTE*) image->data, image->bytes_per_line, &invalidRect);
}
/* Restore the default error handler */
XSync(subsystem->display, False);
XUnlockDisplay(subsystem->display);
region16_union_rect(&(surface->invalidRegion), &(surface->invalidRegion),
- &invalidRect);
+ &invalidRect);
region16_intersect_rect(&(surface->invalidRegion), &(surface->invalidRegion),
- &surfaceRect);
+ &surfaceRect);
if (!region16_is_empty(&(surface->invalidRegion)))
{
width = extents->right - extents->left;
height = extents->bottom - extents->top;
freerdp_image_copy(surface->data, surface->format,
- surface->scanline, x, y, width, height,
- (BYTE*) image->data, PIXEL_FORMAT_BGRX32,
- image->bytes_per_line, x, y, NULL);
+ surface->scanline, x, y, width, height,
+ (BYTE*) image->data, PIXEL_FORMAT_BGRX32,
+ image->bytes_per_line, x, y, NULL, FREERDP_FLIP_NONE);
//x11_shadow_blend_cursor(subsystem);
count = ArrayList_Count(server->clients);
shadow_subsystem_frame_update((rdpShadowSubsystem*)subsystem);
}
static int x11_shadow_subsystem_process_message(x11ShadowSubsystem* subsystem,
- wMessage* message)
+ wMessage* message)
{
switch (message->id)
{
subsystem->xfixes_cursor_notify_event = xfixes_event + XFixesCursorNotify;
XFixesSelectCursorInput(subsystem->display, subsystem->root_window,
- XFixesDisplayCursorNotifyMask);
+ XFixesDisplayCursorNotifyMask);
return 1;
#else
return -1;
x11_shadow_subsystem_base_init(subsystem);
if (!XineramaQueryExtension(subsystem->display, &xinerama_event,
- &xinerama_error))
+ &xinerama_error))
return -1;
if (!XDamageQueryVersion(subsystem->display, &major, &minor))
subsystem->xdamage_notify_event = damage_event + XDamageNotify;
subsystem->xdamage = XDamageCreate(subsystem->display, subsystem->root_window,
- XDamageReportDeltaRectangles);
+ XDamageReportDeltaRectangles);
if (!subsystem->xdamage)
return -1;
subsystem->fb_shm_info.shmaddr = (char*) - 1;
subsystem->fb_shm_info.readOnly = False;
subsystem->fb_image = XShmCreateImage(subsystem->display, subsystem->visual,
- subsystem->depth,
- ZPixmap, NULL, &(subsystem->fb_shm_info), subsystem->width, subsystem->height);
+ subsystem->depth,
+ ZPixmap, NULL, &(subsystem->fb_shm_info), subsystem->width, subsystem->height);
if (!subsystem->fb_image)
{
}
subsystem->fb_shm_info.shmid = shmget(IPC_PRIVATE,
- subsystem->fb_image->bytes_per_line * subsystem->fb_image->height,
- IPC_CREAT | 0600);
+ subsystem->fb_image->bytes_per_line * subsystem->fb_image->height,
+ IPC_CREAT | 0600);
if (subsystem->fb_shm_info.shmid == -1)
{
XSync(subsystem->display, False);
shmctl(subsystem->fb_shm_info.shmid, IPC_RMID, 0);
subsystem->fb_pixmap = XShmCreatePixmap(subsystem->display,
- subsystem->root_window, subsystem->fb_image->data, &(subsystem->fb_shm_info),
- subsystem->fb_image->width, subsystem->fb_image->height,
- subsystem->fb_image->depth);
+ subsystem->root_window, subsystem->fb_image->data, &(subsystem->fb_shm_info),
+ subsystem->fb_image->width, subsystem->fb_image->height,
+ subsystem->fb_image->depth);
XSync(subsystem->display, False);
if (!subsystem->fb_pixmap)
values.subwindow_mode = IncludeInferiors;
values.graphics_exposures = False;
subsystem->xshm_gc = XCreateGC(subsystem->display, subsystem->root_window,
- GCSubwindowMode | GCGraphicsExposures, &values);
+ GCSubwindowMode | GCGraphicsExposures, &values);
XSetFunction(subsystem->display, subsystem->xshm_gc, GXcopy);
XSync(subsystem->display, False);
return 1;
template.class = TrueColor;
template.screen = subsystem->number;
vis = XGetVisualInfo(subsystem->display, VisualClassMask | VisualScreenMask,
- &template, &vi_count);
+ &template, &vi_count);
if (!vis)
{
XFree(vis);
XSelectInput(subsystem->display, subsystem->root_window,
- SubstructureNotifyMask);
+ SubstructureNotifyMask);
subsystem->cursorMaxWidth = 256;
subsystem->cursorMaxHeight = 256;
subsystem->cursorPixels = _aligned_malloc(subsystem->cursorMaxWidth *
- subsystem->cursorMaxHeight * 4, 16);
+ subsystem->cursorMaxHeight * 4, 16);
if (!subsystem->cursorPixels)
return -1;
}
if (!(subsystem->event = CreateFileDescriptorEvent(NULL, FALSE, FALSE,
- subsystem->xfds, WINPR_FD_READ)))
+ subsystem->xfds, WINPR_FD_READ)))
return -1;
virtualScreen = &(subsystem->virtualScreen);
virtualScreen->bottom = subsystem->height;
virtualScreen->flags = 1;
WLog_INFO(TAG, "X11 Extensions: XFixes: %d Xinerama: %d XDamage: %d XShm: %d",
- subsystem->use_xfixes, subsystem->use_xinerama, subsystem->use_xdamage,
- subsystem->use_xshm);
+ subsystem->use_xfixes, subsystem->use_xinerama, subsystem->use_xdamage,
+ subsystem->use_xshm);
return 1;
}
return -1;
if (!(subsystem->thread = CreateThread(NULL, 0,
- (LPTHREAD_START_ROUTINE) x11_shadow_subsystem_thread,
- (void*) subsystem, 0, NULL)))
+ (LPTHREAD_START_ROUTINE) x11_shadow_subsystem_thread,
+ (void*) subsystem, 0, NULL)))
{
WLog_ERR(TAG, "Failed to create thread");
return -1;