Author: tkreuzer
Date: Fri Jan 2 16:08:09 2009
New Revision: 38511
URL:
http://svn.reactos.org/svn/reactos?rev=38511&view=rev
Log:
Use the bitmap's palette, not the DC one's in NtGdiGetDIBitsInternal. Fixes
Firefox colors going nots after 60 sec.
See issue #3854 for more details.
Modified:
trunk/reactos/subsystems/win32/win32k/objects/dibobj.c
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] Fri Jan 2
16:08:09 2009
@@ -622,7 +622,6 @@
return 0;
}
- /* Get handle for the palette in DC. */
Dc = DC_LockDc(hDC);
if (Dc == NULL) return 0;
if (Dc->DC_Type == DC_TYPE_INFO)
@@ -630,14 +629,18 @@
DC_UnlockDc(Dc);
return 0;
}
- /* Source palette obtained from the windows hdc */
- hSourcePalette = Dc->DcLevel.hpal;
DC_UnlockDc(Dc);
/* Get a pointer to the source bitmap object */
BitmapObj = BITMAPOBJ_LockBitmap(hBitmap);
if (BitmapObj == NULL)
return 0;
+
+ hSourcePalette = BitmapObj->hDIBPalette;
+ if (!hSourcePalette)
+ {
+ hSourcePalette = pPrimarySurface->DevInfo.hpalDefault;
+ }
ColorPtr = ((PBYTE)Info + Info->bmiHeader.biSize);
rgbQuads = (RGBQUAD *)ColorPtr;