Author: jgardou
Date: Wed Mar 2 00:15:57 2011
New Revision: 50949
URL:
http://svn.reactos.org/svn/reactos?rev=50949&view=rev
Log:
[WIN32K]
- in 1bpp bitmaps, 0 means white. Take that into in SetDIBits
- fix a fixme in XLATEOBJ implementation
- remove useless field from ROS_DCINFO
Fixes fox audio player GUI :-) Enjoy!
Modified:
trunk/reactos/subsystems/win32/win32k/eng/xlate.c
trunk/reactos/subsystems/win32/win32k/include/dc.h
trunk/reactos/subsystems/win32/win32k/include/palette.h
trunk/reactos/subsystems/win32/win32k/objects/dibobj.c
Modified: trunk/reactos/subsystems/win32/win32k/eng/xlate.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/en…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/eng/xlate.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/eng/xlate.c [iso-8859-1] Wed Mar 2 00:15:57
2011
@@ -418,9 +418,9 @@
else if (ppalSrc->flFlags & PAL_BITFIELDS)
{
PALETTE_vGetBitMasks(ppalSrc, &pexlo->ulRedMask);
- pexlo->ulRedShift = CalculateShift(0xFF, pexlo->ulRedMask);
- pexlo->ulGreenShift = CalculateShift(0xFF00, pexlo->ulGreenMask);
- pexlo->ulBlueShift = CalculateShift(0xFF0000, pexlo->ulBlueMask);
+ pexlo->ulRedShift = CalculateShift(RGB(0xFF,0,0), pexlo->ulRedMask);
+ pexlo->ulGreenShift = CalculateShift(RGB(0,0xFF,0),
pexlo->ulGreenMask);
+ pexlo->ulBlueShift = CalculateShift(RGB(0,0,0xFF), pexlo->ulBlueMask);
pexlo->aulXlate[0] = EXLATEOBJ_iXlateShiftAndMask(pexlo, crSrcBackColor);
}
@@ -480,18 +480,12 @@
}
else
{
- // FIXME: use PALETTE_ulGetNearest
- EXLATEOBJ exloTmp = *pexlo;
- exloTmp.xlo.pulXlate = exloTmp.aulXlate;
-
- pexlo->xlo.flXlate |= XO_TABLE;
for (i = 0; i < pexlo->xlo.cEntries; i++)
{
ulColor = RGB(ppalSrc->IndexedColors[i].peRed,
ppalSrc->IndexedColors[i].peGreen,
ppalSrc->IndexedColors[i].peBlue);
- pexlo->xlo.pulXlate[i] =
- EXLATEOBJ_iXlateShiftAndMask(&exloTmp, ulColor);
+ pexlo->xlo.pulXlate[i] = PALETTE_ulGetNearestBitFieldsIndex(ppalDst,
ulColor);
}
}
}
Modified: trunk/reactos/subsystems/win32/win32k/include/dc.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/dc.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/dc.h [iso-8859-1] Wed Mar 2 00:15:57
2011
@@ -55,9 +55,6 @@
HRGN hGCClipRgn; /* GC clip region (ClipRgn AND VisRgn) */
CLIPOBJ *CombinedClip;
-
- UNICODE_STRING DriverName;
-
} ROS_DC_INFO;
typedef struct _DCLEVEL
Modified: trunk/reactos/subsystems/win32/win32k/include/palette.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/palette.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/palette.h [iso-8859-1] Wed Mar 2
00:15:57 2011
@@ -81,6 +81,7 @@
INT FASTCALL PALETTE_GetObject(PPALETTE pGdiObject, INT cbCount, LPLOGBRUSH lpBuffer);
ULONG NTAPI PALETTE_ulGetNearestPaletteIndex(PALETTE* ppal, ULONG iColor);
ULONG NTAPI PALETTE_ulGetNearestIndex(PALETTE* ppal, ULONG iColor);
+ULONG NTAPI PALETTE_ulGetNearestBitFieldsIndex(PALETTE* ppal, ULONG ulColor);
VOID NTAPI PALETTE_vGetBitMasks(PPALETTE ppal, PULONG pulColors);
PPALETTEENTRY FASTCALL ReturnSystemPalette (VOID);
Modified: trunk/reactos/subsystems/win32/win32k/objects/dibobj.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/dibobj.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/dibobj.c [iso-8859-1] Wed Mar 2
00:15:57 2011
@@ -295,7 +295,8 @@
ptSrc.x = 0;
ptSrc.y = 0;
- EXLATEOBJ_vInitialize(&exlo, psurfSrc->ppal, psurfDst->ppal, 0, 0, 0);
+ /* 1bpp bitmaps have 0 for white, 1 for black */
+ EXLATEOBJ_vInitialize(&exlo, psurfSrc->ppal, psurfDst->ppal, 0xFFFFFF, 0,
0);
result = IntEngCopyBits(&psurfDst->SurfObj,
&psurfSrc->SurfObj,