Author: tkreuzer
Date: Wed Feb 4 08:21:54 2015
New Revision: 66157
URL:
http://svn.reactos.org/svn/reactos?rev=66157&view=rev
Log:
[WIN32K]
Always update surface flags in EngModifySurface
Modified:
trunk/reactos/win32ss/gdi/eng/surface.c
Modified: trunk/reactos/win32ss/gdi/eng/surface.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/surface.c?…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/surface.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/surface.c [iso-8859-1] Wed Feb 4 08:21:54 2015
@@ -434,18 +434,20 @@
_In_ FLONG flHooks,
_In_ FLONG flSurface,
_In_ DHSURF dhsurf,
- _In_ VOID *pvScan0,
+ _In_ PVOID pvScan0,
_In_ LONG lDelta,
- _Reserved_ VOID *pvReserved)
+ _Reserved_ PVOID pvReserved)
{
SURFOBJ *pso;
PSURFACE psurf;
PDEVOBJ* ppdev;
PPALETTE ppal;
+ /* Lock the surface */
psurf = SURFACE_ShareLockSurface(hsurf);
if (psurf == NULL)
{
+ DPRINT1("Failed to reference surface %p\n", hsurf);
return FALSE;
}
@@ -466,6 +468,16 @@
SURFACE_vSetPalette(psurf, ppal);
PALETTE_ShareUnlockPalette(ppal);
+ /* Update surface flags */
+ if (flSurface & MS_NOTSYSTEMMEMORY)
+ pso->fjBitmap |= BMF_NOTSYSMEM;
+ else
+ pso->fjBitmap &= ~BMF_NOTSYSMEM;
+ if (flSurface & MS_SHAREDACCESS)
+ psurf->flags |= SHAREACCESS_SURFACE;
+ else
+ psurf->flags &= ~SHAREACCESS_SURFACE;
+
/* Check if the caller passed bitmap bits */
if ((pvScan0 != NULL) && (lDelta != 0))
{
@@ -491,16 +503,6 @@
pso->pvBits = (PCHAR)pso->pvScan0 - pso->cjBits - lDelta;
pso->fjBitmap &= ~BMF_TOPDOWN;
}
-
- /* Update surface flags */
- if (flSurface & MS_NOTSYSTEMMEMORY)
- pso->fjBitmap |= BMF_NOTSYSMEM;
- else
- pso->fjBitmap &= ~BMF_NOTSYSMEM;
- if (flSurface & MS_SHAREDACCESS)
- psurf->flags |= SHAREACCESS_SURFACE;
- else
- psurf->flags &= ~SHAREACCESS_SURFACE;
}
else
{
@@ -530,7 +532,7 @@
psurf = SURFACE_ShareLockSurface(hsurf);
if (!psurf)
{
- DPRINT1("Could not reference surface to delete\n");
+ DPRINT1("Could not reference surface %p to delete\n", hsurf);
return FALSE;
}