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.

svn path=/trunk/; revision=38511
This commit is contained in:
Timo Kreuzer 2009-01-02 22:08:09 +00:00
parent fbd7681b84
commit 1fa9bb9b8e

View file

@ -622,7 +622,6 @@ NtGdiGetDIBitsInternal(HDC hDC,
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,8 +629,6 @@ NtGdiGetDIBitsInternal(HDC hDC,
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 */
@ -639,6 +636,12 @@ NtGdiGetDIBitsInternal(HDC hDC,
if (BitmapObj == NULL)
return 0;
hSourcePalette = BitmapObj->hDIBPalette;
if (!hSourcePalette)
{
hSourcePalette = pPrimarySurface->DevInfo.hpalDefault;
}
ColorPtr = ((PBYTE)Info + Info->bmiHeader.biSize);
rgbQuads = (RGBQUAD *)ColorPtr;