mirror of
https://github.com/reactos/reactos.git
synced 2025-02-20 15:35:04 +00:00
fast cleanup in dib/dib24bpp.c, Fixing a crash bug in dib32bpp.c (typo from me), xlate XO_TABLE can resive 0xffff or 0xffff or 0xffffff or 0xffffffff as color code for table, but the table is only 256 but in color&FF, That will stop firefox crash and translate the color right.
svn path=/trunk/; revision=21650
This commit is contained in:
parent
e5a4bd769c
commit
6da6e80112
3 changed files with 6 additions and 8 deletions
|
@ -283,12 +283,9 @@ DIB_24BPP_BitBltSrcCopy(PBLTINFO BltInfo)
|
|||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* FIXME */
|
||||
//DPRINT1("DIB_24BPP_Bitblt: Unhandled BltInfo->XlateSourceToDest for 16 -> 16 copy\n");
|
||||
// return DIB_16BPP_BitBltSrcCopy(BltInfo);
|
||||
{
|
||||
sx = BltInfo->SourcePoint.x;
|
||||
sy = BltInfo->SourcePoint.y;
|
||||
sy = BltInfo->SourcePoint.y;
|
||||
|
||||
for (j=BltInfo->DestRect.top; j<BltInfo->DestRect.bottom; j++)
|
||||
{
|
||||
|
|
|
@ -304,7 +304,7 @@ DIB_32BPP_BitBltSrcCopy(PBLTINFO BltInfo)
|
|||
{
|
||||
Dest32 = (DWORD *) DestBits + (BltInfo->DestRect.right - BltInfo->DestRect.left - 1);
|
||||
Source32 = (DWORD *) SourceBits + (BltInfo->DestRect.right - BltInfo->DestRect.left - 1);
|
||||
for (i = BltInfo->DestRect.right; BltInfo->DestRect.left < i; i--)
|
||||
for (i = BltInfo->DestRect.right; BltInfo->DestRect.left <= i; i--)
|
||||
{
|
||||
*Dest32-- = XLATEOBJ_iXlate(BltInfo->XlateSourceToDest, *Source32--);
|
||||
}
|
||||
|
|
|
@ -493,9 +493,10 @@ XLATEOBJ_iXlate(XLATEOBJ *XlateObj, ULONG Color)
|
|||
|
||||
if (XlateObj->flXlate & XO_TRIVIAL)
|
||||
return Color;
|
||||
|
||||
if ((XlateObj->flXlate & XO_TABLE))
|
||||
return XlateObj->pulXlate[Color & 0xff];
|
||||
|
||||
if (XlateObj->flXlate & XO_TABLE)
|
||||
return XlateObj->pulXlate[Color];
|
||||
|
||||
if (XlateObj->flXlate & XO_TO_MONO)
|
||||
return Color == XlateObj->pulXlate[0];
|
||||
|
|
Loading…
Reference in a new issue