mirror of
https://github.com/reactos/reactos.git
synced 2025-07-27 13:43:22 +00:00
[WIN32K]
- 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:
parent
e3b34383eb
commit
1a601ba9e5
2 changed files with 6 additions and 7 deletions
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue