- Set DC_DIBSECTION dirty flag when a DIB section is selected, not when one is created.

svn path=/trunk/; revision=47787
This commit is contained in:
Jérôme Gardou 2010-06-16 16:59:29 +00:00
parent e3b34383eb
commit 1a601ba9e5
2 changed files with 6 additions and 7 deletions

View file

@ -297,10 +297,14 @@ NtGdiSelectBitmap(
{
// pDC->rosdc.bitsPerPixel = psurfBmp->dib->dsBmih.biBitCount; ???
pDC->rosdc.bitsPerPixel = BitsPerFormat(psurfBmp->SurfObj.iBitmapFormat);
/* Set DIBSECTION attribute */
pdcattr->ulDirty_ |= DC_DIBSECTION;
}
else
{
pDC->rosdc.bitsPerPixel = BitsPerFormat(psurfBmp->SurfObj.iBitmapFormat);
/* Restore DIBSECTION attribute */
pdcattr->ulDirty_ &= ~DC_DIBSECTION;
}
/* FIXME; improve by using a region without a handle and selecting it */

View file

@ -1347,7 +1347,6 @@ DIB_CreateDIBSection(
HBITMAP res = 0;
SURFACE *bmp = NULL;
void *mapBits = NULL;
PDC_ATTR pdcattr;
// Fill BITMAP32 structure with DIB data
BITMAPINFOHEADER *bi = &bmi->bmiHeader;
@ -1370,8 +1369,6 @@ DIB_CreateDIBSection(
return (HBITMAP)NULL;
}
pdcattr = dc->pdcattr;
effHeight = bi->biHeight >= 0 ? bi->biHeight : -bi->biHeight;
bm.bmType = 0;
bm.bmWidth = bi->biWidth;
@ -1593,8 +1590,6 @@ DIB_CreateDIBSection(
*bits = bm.bmBits;
}
if (res) pdcattr->ulDirty_ |= DC_DIBSECTION;
return res;
}