libfreerdp-gdi: add PatBlt DPa operation
This commit is contained in:
parent
7dded76f0e
commit
a3396a121b
@ -488,6 +488,7 @@ boolean xf_pre_connect(freerdp* instance)
|
||||
|
||||
settings->os_major_type = OSMAJORTYPE_UNIX;
|
||||
settings->os_minor_type = OSMINORTYPE_NATIVE_XSERVER;
|
||||
|
||||
settings->order_support[NEG_DSTBLT_INDEX] = true;
|
||||
settings->order_support[NEG_PATBLT_INDEX] = true;
|
||||
settings->order_support[NEG_SCRBLT_INDEX] = true;
|
||||
|
@ -65,6 +65,7 @@
|
||||
#define GDI_DSPDxax 0x00E20746 /* D = (S & P) | (~S & D) */
|
||||
#define GDI_SPna 0x000C0324 /* D = S & ~P */
|
||||
#define GDI_DSna 0x00220326 /* D = D & ~S */
|
||||
#define GDI_DPa 0x00A000C9 /* D = D & P */
|
||||
#define GDI_PDxn 0x00A50065 /* D = D ^ ~P */
|
||||
|
||||
/* Brush Styles */
|
||||
|
@ -434,6 +434,31 @@ static int BitBlt_SPna_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int BitBlt_DPa_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight)
|
||||
{
|
||||
int x, y;
|
||||
uint16* dstp;
|
||||
uint16* patp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
dstp = (uint16*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
|
||||
if (dstp != 0)
|
||||
{
|
||||
for (x = 0; x < nWidth; x++)
|
||||
{
|
||||
patp = (uint16*) gdi_get_brush_pointer(hdcDest, x, y);
|
||||
|
||||
*dstp = *dstp & *patp;
|
||||
dstp++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int BitBlt_PDxn_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight)
|
||||
{
|
||||
int x, y;
|
||||
@ -778,6 +803,10 @@ int PatBlt_16bpp(HGDI_DC hdc, int nXLeft, int nYLeft, int nWidth, int nHeight, i
|
||||
return BitBlt_WHITENESS_16bpp(hdc, nXLeft, nYLeft, nWidth, nHeight);
|
||||
break;
|
||||
|
||||
case GDI_DPa:
|
||||
return BitBlt_DPa_16bpp(hdc, nXLeft, nYLeft, nWidth, nHeight);
|
||||
break;
|
||||
|
||||
case GDI_PDxn:
|
||||
return BitBlt_PDxn_16bpp(hdc, nXLeft, nYLeft, nWidth, nHeight);
|
||||
break;
|
||||
|
@ -487,6 +487,31 @@ static int BitBlt_DSna_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int BitBlt_DPa_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight)
|
||||
{
|
||||
int x, y;
|
||||
uint32* dstp;
|
||||
uint32* patp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
dstp = (uint32*) gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
|
||||
if (dstp != 0)
|
||||
{
|
||||
for (x = 0; x < nWidth; x++)
|
||||
{
|
||||
patp = (uint32*) gdi_get_brush_pointer(hdcDest, x, y);
|
||||
|
||||
*dstp = *dstp & *patp;
|
||||
dstp++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int BitBlt_PDxn_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight)
|
||||
{
|
||||
int x, y;
|
||||
@ -807,6 +832,10 @@ int PatBlt_32bpp(HGDI_DC hdc, int nXLeft, int nYLeft, int nWidth, int nHeight, i
|
||||
return BitBlt_WHITENESS_32bpp(hdc, nXLeft, nYLeft, nWidth, nHeight);
|
||||
break;
|
||||
|
||||
case GDI_DPa:
|
||||
return BitBlt_DPa_32bpp(hdc, nXLeft, nYLeft, nWidth, nHeight);
|
||||
break;
|
||||
|
||||
case GDI_PDxn:
|
||||
return BitBlt_PDxn_32bpp(hdc, nXLeft, nYLeft, nWidth, nHeight);
|
||||
break;
|
||||
|
@ -339,6 +339,31 @@ static int BitBlt_SPna_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int BitBlt_DPa_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight)
|
||||
{
|
||||
int x, y;
|
||||
uint8* dstp;
|
||||
uint8* patp;
|
||||
|
||||
for (y = 0; y < nHeight; y++)
|
||||
{
|
||||
dstp = gdi_get_bitmap_pointer(hdcDest, nXDest, nYDest + y);
|
||||
|
||||
if (dstp != 0)
|
||||
{
|
||||
for (x = 0; x < nWidth; x++)
|
||||
{
|
||||
patp = gdi_get_brush_pointer(hdcDest, x, y);
|
||||
|
||||
*dstp = *dstp & *patp;
|
||||
dstp++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int BitBlt_PDxn_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight)
|
||||
{
|
||||
int x, y;
|
||||
@ -688,6 +713,10 @@ int PatBlt_8bpp(HGDI_DC hdc, int nXLeft, int nYLeft, int nWidth, int nHeight, in
|
||||
return BitBlt_WHITENESS_8bpp(hdc, nXLeft, nYLeft, nWidth, nHeight);
|
||||
break;
|
||||
|
||||
case GDI_DPa:
|
||||
return BitBlt_DPa_8bpp(hdc, nXLeft, nYLeft, nWidth, nHeight);
|
||||
break;
|
||||
|
||||
case GDI_PDxn:
|
||||
return BitBlt_PDxn_8bpp(hdc, nXLeft, nYLeft, nWidth, nHeight);
|
||||
break;
|
||||
|
@ -628,7 +628,27 @@ void gdi_memblt(rdpContext* context, MEMBLT_ORDER* memblt)
|
||||
|
||||
void gdi_mem3blt(rdpContext* context, MEM3BLT_ORDER* mem3blt)
|
||||
{
|
||||
printf("Mem3Blt\n");
|
||||
}
|
||||
|
||||
void gdi_polygon_sc(rdpContext* context, POLYGON_SC_ORDER* polygon_sc)
|
||||
{
|
||||
printf("PolygonSC\n");
|
||||
}
|
||||
|
||||
void gdi_polygon_cb(rdpContext* context, POLYGON_CB_ORDER* polygon_cb)
|
||||
{
|
||||
printf("PolygonCB\n");
|
||||
}
|
||||
|
||||
void gdi_ellipse_sc(rdpContext* context, ELLIPSE_SC_ORDER* ellipse_sc)
|
||||
{
|
||||
printf("EllipseSC\n");
|
||||
}
|
||||
|
||||
void gdi_ellipse_cb(rdpContext* context, ELLIPSE_CB_ORDER* ellipse_cb)
|
||||
{
|
||||
printf("EllipseCB\n");
|
||||
}
|
||||
|
||||
int tilenum = 0;
|
||||
@ -776,10 +796,10 @@ void gdi_register_update_callbacks(rdpUpdate* update)
|
||||
primary->GlyphIndex = NULL;
|
||||
primary->FastIndex = NULL;
|
||||
primary->FastGlyph = NULL;
|
||||
primary->PolygonSC = NULL;
|
||||
primary->PolygonCB = NULL;
|
||||
primary->EllipseSC = NULL;
|
||||
primary->EllipseCB = NULL;
|
||||
primary->PolygonSC = gdi_polygon_sc;
|
||||
primary->PolygonCB = gdi_polygon_cb;
|
||||
primary->EllipseSC = gdi_ellipse_sc;
|
||||
primary->EllipseCB = gdi_ellipse_cb;
|
||||
|
||||
update->SurfaceBits = gdi_surface_bits;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user