Author: jgardou
Date: Wed Jun 16 16:59:29 2010
New Revision: 47787
URL:
http://svn.reactos.org/svn/reactos?rev=47787&view=rev
Log:
[WIN32K]
- Set DC_DIBSECTION dirty flag when a DIB section is selected, not when one is created.
Modified:
trunk/reactos/subsystems/win32/win32k/objects/dcobjs.c
trunk/reactos/subsystems/win32/win32k/objects/dibobj.c
Modified: trunk/reactos/subsystems/win32/win32k/objects/dcobjs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/dcobjs.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/dcobjs.c [iso-8859-1] Wed Jun 16
16:59:29 2010
@@ -297,10 +297,14 @@
{
// 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 */
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 Jun 16
16:59:29 2010
@@ -558,7 +558,7 @@
EXLATEOBJ_vInitialize(&exlo, ppalDIB, ppalDDB, 0, 0, 0);
/* Copy the bits */
- DPRINT("BitsToDev with dstsurf=(%d|%d) (%d|%d), src=(%d|%d) w=%d h=%d\n",
+ DPRINT("BitsToDev with dstsurf=(%d|%d) (%d|%d), src=(%d|%d) w=%d h=%d\n",
rcDest.left, rcDest.top, rcDest.right, rcDest.bottom,
ptSource.x, ptSource.y, SourceSize.cx, SourceSize.cy);
Status = IntEngBitBlt(pDestSurf,
@@ -636,7 +636,7 @@
_SEH2_TRY
{
ProbeForRead(&Info->bmiHeader.biSize, sizeof(DWORD), 1);
-
+
ProbeForWrite(Info, Info->bmiHeader.biSize, 1); // Comp for Core.
if (ChkBits) ProbeForWrite(ChkBits, MaxBits, 1);
}
@@ -1347,7 +1347,6 @@
HBITMAP res = 0;
SURFACE *bmp = NULL;
void *mapBits = NULL;
- PDC_ATTR pdcattr;
// Fill BITMAP32 structure with DIB data
BITMAPINFOHEADER *bi = &bmi->bmiHeader;
@@ -1369,8 +1368,6 @@
{
return (HBITMAP)NULL;
}
-
- pdcattr = dc->pdcattr;
effHeight = bi->biHeight >= 0 ? bi->biHeight : -bi->biHeight;
bm.bmType = 0;
@@ -1593,8 +1590,6 @@
*bits = bm.bmBits;
}
- if (res) pdcattr->ulDirty_ |= DC_DIBSECTION;
-
return res;
}