Fixed part of font cache issue.
This commit is contained in:
parent
3f90966da6
commit
bb82d48506
@ -25,8 +25,8 @@
|
|||||||
struct _GLYPH_DATA
|
struct _GLYPH_DATA
|
||||||
{
|
{
|
||||||
UINT32 cacheIndex;
|
UINT32 cacheIndex;
|
||||||
INT32 x;
|
INT16 x;
|
||||||
INT32 y;
|
INT16 y;
|
||||||
UINT32 cx;
|
UINT32 cx;
|
||||||
UINT32 cy;
|
UINT32 cy;
|
||||||
UINT32 cb;
|
UINT32 cb;
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -185,8 +185,8 @@ static BOOL BitBlt_SRCCOPY(HGDI_DC hdcDest, UINT32 nXDest, UINT32 nYDest,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
return freerdp_image_copy(hDstBmp->data, hDstBmp->format, hDstBmp->scanline,
|
return freerdp_image_copy(hDstBmp->data, hDstBmp->format, hDstBmp->scanline,
|
||||||
nXDest, nYDest, nWidth, nHeight,
|
nXDest, nYDest, nWidth, nHeight,
|
||||||
hSrcBmp->data, hSrcBmp->format, hSrcBmp->scanline,
|
hSrcBmp->data, hSrcBmp->format, hSrcBmp->scanline,
|
||||||
nXSrc, nYSrc, palette);
|
nXSrc, nYSrc, palette);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -247,7 +247,7 @@ static BOOL BitBlt_SRCERASE(HGDI_DC hdcDest, UINT32 nXDest, UINT32 nYDest,
|
|||||||
UINT32 color;
|
UINT32 color;
|
||||||
colorA = ConvertColor(colorA, hdcSrc->format, hdcDest->format,
|
colorA = ConvertColor(colorA, hdcSrc->format, hdcDest->format,
|
||||||
palette);
|
palette);
|
||||||
color = ~colorA & colorB;
|
color = colorA & ~colorB;
|
||||||
WriteColor(dstp, hdcDest->format, color);
|
WriteColor(dstp, hdcDest->format, color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -277,11 +277,11 @@ static BOOL BitBlt_NOTSRCERASE(HGDI_DC hdcDest, UINT32 nXDest, UINT32 nYDest,
|
|||||||
if (srcp && dstp)
|
if (srcp && dstp)
|
||||||
{
|
{
|
||||||
UINT32 color;
|
UINT32 color;
|
||||||
UINT32 colorA = ReadColor(dstp, hdcDest->format);
|
UINT32 colorA = ReadColor(srcp, hdcSrc->format);
|
||||||
UINT32 colorB = ReadColor(srcp, hdcSrc->format);
|
UINT32 colorB = ReadColor(dstp, hdcDest->format);
|
||||||
colorB = ConvertColor(colorB, hdcSrc->format,
|
colorA = ConvertColor(colorA, hdcSrc->format,
|
||||||
hdcDest->format, palette);
|
hdcDest->format, palette);
|
||||||
color = ~(colorA | colorB);
|
color = ~colorA & ~colorB;
|
||||||
WriteColor(dstp, hdcDest->format, color);
|
WriteColor(dstp, hdcDest->format, color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -311,9 +311,9 @@ static BOOL BitBlt_SRCINVERT(HGDI_DC hdcDest, UINT32 nXDest, UINT32 nYDest,
|
|||||||
if (srcp && dstp)
|
if (srcp && dstp)
|
||||||
{
|
{
|
||||||
UINT32 color;
|
UINT32 color;
|
||||||
UINT32 colorA = ReadColor(dstp, hdcDest->format);
|
UINT32 colorA = ReadColor(srcp, hdcSrc->format);
|
||||||
UINT32 colorB = ReadColor(srcp, hdcSrc->format);
|
UINT32 colorB = ReadColor(dstp, hdcDest->format);
|
||||||
colorB = ConvertColor(colorB, hdcSrc->format,
|
colorA = ConvertColor(colorA, hdcSrc->format,
|
||||||
hdcDest->format, palette);
|
hdcDest->format, palette);
|
||||||
color = colorA ^ colorB;
|
color = colorA ^ colorB;
|
||||||
WriteColor(dstp, hdcDest->format, color);
|
WriteColor(dstp, hdcDest->format, color);
|
||||||
@ -345,9 +345,9 @@ static BOOL BitBlt_SRCAND(HGDI_DC hdcDest, UINT32 nXDest, UINT32 nYDest,
|
|||||||
if (srcp && dstp)
|
if (srcp && dstp)
|
||||||
{
|
{
|
||||||
UINT32 color;
|
UINT32 color;
|
||||||
UINT32 colorA = ReadColor(dstp, hdcDest->format);
|
UINT32 colorA = ReadColor(srcp, hdcSrc->format);
|
||||||
UINT32 colorB = ReadColor(srcp, hdcSrc->format);
|
UINT32 colorB = ReadColor(dstp, hdcDest->format);
|
||||||
colorB = ConvertColor(colorB, hdcSrc->format,
|
colorA = ConvertColor(colorA, hdcSrc->format,
|
||||||
hdcDest->format, palette);
|
hdcDest->format, palette);
|
||||||
color = colorA & colorB;
|
color = colorA & colorB;
|
||||||
WriteColor(dstp, hdcDest->format, color);
|
WriteColor(dstp, hdcDest->format, color);
|
||||||
@ -397,12 +397,13 @@ static BOOL BitBlt_DSPDxax(HGDI_DC hdcDest, UINT32 nXDest, UINT32 nYDest,
|
|||||||
UINT32 nXSrc, UINT32 nYSrc, const gdiPalette* palette)
|
UINT32 nXSrc, UINT32 nYSrc, const gdiPalette* palette)
|
||||||
{
|
{
|
||||||
UINT32 x, y;
|
UINT32 x, y;
|
||||||
UINT32 colorC;
|
UINT32 color;
|
||||||
|
|
||||||
if (!hdcDest || !hdcSrc)
|
if (!hdcDest || !hdcSrc)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
colorC = hdcDest->textColor;
|
/* D = (D ^ S) & (P ^ D) */
|
||||||
|
color = hdcDest->textColor;
|
||||||
|
|
||||||
for (y = 0; y < nHeight; y++)
|
for (y = 0; y < nHeight; y++)
|
||||||
{
|
{
|
||||||
@ -416,15 +417,11 @@ static BOOL BitBlt_DSPDxax(HGDI_DC hdcDest, UINT32 nXDest, UINT32 nYDest,
|
|||||||
if (srcp && dstp)
|
if (srcp && dstp)
|
||||||
{
|
{
|
||||||
UINT32 dstColor;
|
UINT32 dstColor;
|
||||||
UINT32 tmp1, tmp2;
|
UINT32 colorA = ReadColor(srcp, hdcSrc->format);
|
||||||
UINT32 colorA = ReadColor(dstp, hdcDest->format);
|
UINT32 colorB = ReadColor(dstp, hdcDest->format);
|
||||||
UINT32 colorB = ReadColor(srcp, hdcSrc->format);
|
colorA = ConvertColor(colorA, hdcSrc->format,
|
||||||
colorB = ConvertColor(colorB, hdcSrc->format,
|
|
||||||
hdcDest->format, palette);
|
hdcDest->format, palette);
|
||||||
tmp1 = colorA ^ colorB;
|
dstColor = (colorA & color) | (~colorA & colorB);
|
||||||
tmp2 = tmp1 & colorC;
|
|
||||||
dstColor = tmp2 ^ colorA;
|
|
||||||
//dstColor = (colorA ^ colorB) & (colorC ^ colorA);
|
|
||||||
WriteColor(dstp, hdcDest->format, dstColor);
|
WriteColor(dstp, hdcDest->format, dstColor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -445,7 +442,7 @@ static BOOL BitBlt_PSDPxax(HGDI_DC hdcDest, UINT32 nXDest, UINT32 nYDest,
|
|||||||
/* D = (S & D) | (~S & P) */
|
/* D = (S & D) | (~S & P) */
|
||||||
if (hdcDest->brush->style == GDI_BS_SOLID)
|
if (hdcDest->brush->style == GDI_BS_SOLID)
|
||||||
{
|
{
|
||||||
UINT32 colorA = hdcDest->brush->color;
|
UINT32 colorC = hdcDest->brush->color;
|
||||||
|
|
||||||
for (y = 0; y < nHeight; y++)
|
for (y = 0; y < nHeight; y++)
|
||||||
{
|
{
|
||||||
@ -459,11 +456,11 @@ static BOOL BitBlt_PSDPxax(HGDI_DC hdcDest, UINT32 nXDest, UINT32 nYDest,
|
|||||||
if (srcp && dstp)
|
if (srcp && dstp)
|
||||||
{
|
{
|
||||||
UINT32 color;
|
UINT32 color;
|
||||||
UINT32 colorB = ReadColor(srcp, hdcSrc->format);
|
UINT32 colorA = ReadColor(srcp, hdcSrc->format);
|
||||||
UINT32 colorC = ReadColor(dstp, hdcDest->format);
|
UINT32 colorB = ReadColor(dstp, hdcDest->format);
|
||||||
colorB = ConvertColor(colorB, hdcSrc->format,
|
colorA = ConvertColor(colorA, hdcSrc->format,
|
||||||
hdcDest->format, palette);
|
hdcDest->format, palette);
|
||||||
color = ((colorA ^ colorB) & colorC) ^ colorA;
|
color = (colorA & colorB) | (~colorA & colorC);
|
||||||
WriteColor(dstp, hdcDest->format, color);
|
WriteColor(dstp, hdcDest->format, color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -485,12 +482,12 @@ static BOOL BitBlt_PSDPxax(HGDI_DC hdcDest, UINT32 nXDest, UINT32 nYDest,
|
|||||||
if (srcp && dstp)
|
if (srcp && dstp)
|
||||||
{
|
{
|
||||||
UINT32 color;
|
UINT32 color;
|
||||||
UINT32 colorB = ReadColor(srcp, hdcSrc->format);
|
UINT32 colorA = ReadColor(srcp, hdcSrc->format);
|
||||||
UINT32 colorC = ReadColor(dstp, hdcDest->format);
|
UINT32 colorB = ReadColor(dstp, hdcDest->format);
|
||||||
UINT32 colorA = ReadColor(patp, hdcDest->format);
|
UINT32 colorC = ReadColor(patp, hdcDest->format);
|
||||||
colorA = ConvertColor(colorA, hdcSrc->format,
|
colorA = ConvertColor(colorA, hdcSrc->format,
|
||||||
hdcDest->format, palette);
|
hdcDest->format, palette);
|
||||||
color = ((colorA ^ colorB) & colorC) ^ colorA;
|
color = (colorA & colorB) | (~colorA & colorC);
|
||||||
WriteColor(dstp, hdcDest->format, color);
|
WriteColor(dstp, hdcDest->format, color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -512,7 +509,7 @@ static BOOL BitBlt_SPDSxax(HGDI_DC hdcDest, UINT32 nXDest, UINT32 nYDest,
|
|||||||
/* D = S ^ (P & (D ^ S)) */
|
/* D = S ^ (P & (D ^ S)) */
|
||||||
if (hdcDest->brush->style == GDI_BS_SOLID)
|
if (hdcDest->brush->style == GDI_BS_SOLID)
|
||||||
{
|
{
|
||||||
UINT32 colorB = hdcDest->brush->color;
|
UINT32 color = hdcDest->brush->color;
|
||||||
|
|
||||||
for (y = 0; y < nHeight; y++)
|
for (y = 0; y < nHeight; y++)
|
||||||
{
|
{
|
||||||
@ -525,12 +522,12 @@ static BOOL BitBlt_SPDSxax(HGDI_DC hdcDest, UINT32 nXDest, UINT32 nYDest,
|
|||||||
|
|
||||||
if (srcp && dstp)
|
if (srcp && dstp)
|
||||||
{
|
{
|
||||||
UINT32 color;
|
UINT32 colorD;
|
||||||
UINT32 colorA = ReadColor(srcp, hdcSrc->format);
|
UINT32 colorA = ReadColor(srcp, hdcSrc->format);
|
||||||
UINT32 colorC = ReadColor(dstp, hdcDest->format);
|
UINT32 colorB = ReadColor(dstp, hdcDest->format);
|
||||||
colorA = ConvertColor(colorA, hdcSrc->format,
|
colorA = ConvertColor(colorA, hdcSrc->format,
|
||||||
hdcDest->format, palette);
|
hdcDest->format, palette);
|
||||||
color = ((colorA ^ colorB) & colorC) ^ colorA;
|
colorD = colorA ^ (color & (colorB ^ colorA));
|
||||||
WriteColor(dstp, hdcDest->format, color);
|
WriteColor(dstp, hdcDest->format, color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -551,13 +548,13 @@ static BOOL BitBlt_SPDSxax(HGDI_DC hdcDest, UINT32 nXDest, UINT32 nYDest,
|
|||||||
|
|
||||||
if (srcp && dstp)
|
if (srcp && dstp)
|
||||||
{
|
{
|
||||||
UINT32 color;
|
UINT32 colorD;
|
||||||
UINT32 colorA = ReadColor(srcp, hdcSrc->format);
|
UINT32 colorA = ReadColor(srcp, hdcSrc->format);
|
||||||
UINT32 colorB = ReadColor(patp, hdcDest->format);
|
UINT32 colorB = ReadColor(dstp, hdcDest->format);
|
||||||
UINT32 colorC = ReadColor(dstp, hdcDest->format);
|
UINT32 color = ReadColor(patp, hdcDest->format);
|
||||||
colorA = ConvertColor(colorA, hdcSrc->format,
|
colorA = ConvertColor(colorA, hdcSrc->format,
|
||||||
hdcDest->format, palette);
|
hdcDest->format, palette);
|
||||||
color = ((colorA ^ colorB) & colorC) ^ colorA;
|
colorD = colorA ^ (color & (colorB ^ colorA));
|
||||||
WriteColor(dstp, hdcDest->format, color);
|
WriteColor(dstp, hdcDest->format, color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -591,7 +588,7 @@ static BOOL BitBlt_SPna(HGDI_DC hdcDest, UINT32 nXDest, UINT32 nYDest,
|
|||||||
UINT32 colorB = ReadColor(patp, hdcDest->format);
|
UINT32 colorB = ReadColor(patp, hdcDest->format);
|
||||||
colorB = ConvertColor(colorB, hdcDest->format,
|
colorB = ConvertColor(colorB, hdcDest->format,
|
||||||
hdcSrc->format, palette);
|
hdcSrc->format, palette);
|
||||||
color = (~colorA) & colorB;
|
color = colorA & ~colorB;
|
||||||
color = ConvertColor(color, hdcSrc->format, hdcDest->format, palette);
|
color = ConvertColor(color, hdcSrc->format, hdcDest->format, palette);
|
||||||
WriteColor(dstp, hdcDest->format, color);
|
WriteColor(dstp, hdcDest->format, color);
|
||||||
}
|
}
|
||||||
@ -626,7 +623,7 @@ static BOOL BitBlt_DSna(HGDI_DC hdcDest, UINT32 nXDest, UINT32 nYDest,
|
|||||||
UINT32 colorB = ReadColor(dstp, hdcDest->format);
|
UINT32 colorB = ReadColor(dstp, hdcDest->format);
|
||||||
colorA = ConvertColor(colorA, hdcSrc->format,
|
colorA = ConvertColor(colorA, hdcSrc->format,
|
||||||
hdcDest->format, palette);
|
hdcDest->format, palette);
|
||||||
color = colorA & (~colorB);
|
color = ~colorA & colorB;
|
||||||
WriteColor(dstp, hdcDest->format, color);
|
WriteColor(dstp, hdcDest->format, color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -696,7 +693,7 @@ static BOOL BitBlt_MERGEPAINT(HGDI_DC hdcDest, UINT32 nXDest, UINT32 nYDest,
|
|||||||
UINT32 color;
|
UINT32 color;
|
||||||
colorA = ConvertColor(colorA, hdcSrc->format, hdcDest->format,
|
colorA = ConvertColor(colorA, hdcSrc->format, hdcDest->format,
|
||||||
palette);
|
palette);
|
||||||
color = colorA | (~colorB);
|
color = ~colorA | colorB;
|
||||||
WriteColor(dstp, hdcDest->format, color);
|
WriteColor(dstp, hdcDest->format, color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -236,6 +236,7 @@ BOOL gdi_DeleteObject(HGDIOBJECT hgdiobject)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete device context.\n
|
* Delete device context.\n
|
||||||
* @msdn{dd183533}
|
* @msdn{dd183533}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user