Author: tkreuzer
Date: Fri Apr 15 15:20:17 2011
New Revision: 51351
URL:
http://svn.reactos.org/svn/reactos?rev=51351&view=rev
Log:
[WIN32K]
- Use shared locks for surfaces and palettes
- Unimplement NtGdiEngUnlockSurface, it was wrong
Modified:
trunk/reactos/subsystems/win32/win32k/eng/mouse.c
trunk/reactos/subsystems/win32/win32k/eng/surface.c
Modified: trunk/reactos/subsystems/win32/win32k/eng/mouse.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/en…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/eng/mouse.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/eng/mouse.c [iso-8859-1] Fri Apr 15 15:20:17
2011
@@ -390,7 +390,7 @@
if (!psurfMask) goto failure;
/* Initialize an EXLATEOBJ */
- ppal = PALETTE_LockPalette(ppdev->devinfo.hpalDefault);
+ ppal = PALETTE_ShareLockPalette(ppdev->devinfo.hpalDefault);
EXLATEOBJ_vInitialize(&exlo,
&gpalMono,
ppal,
@@ -409,7 +409,7 @@
/* Cleanup */
EXLATEOBJ_vCleanup(&exlo);
- if (ppal) PALETTE_UnlockPalette(ppal);
+ if (ppal) PALETTE_ShareUnlockPalette(ppal);
}
/* Hide mouse pointer */
Modified: trunk/reactos/subsystems/win32/win32k/eng/surface.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/en…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/eng/surface.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/eng/surface.c [iso-8859-1] Fri Apr 15 15:20:17
2011
@@ -376,7 +376,7 @@
ppdev = (PDEVOBJ*)hdev;
/* Lock the surface */
- psurf = SURFACE_LockSurface(hsurf);
+ psurf = SURFACE_ShareLockSurface(hsurf);
if (!psurf)
{
return FALSE;
@@ -394,7 +394,7 @@
/* Get palette */
psurf->ppal = PALETTE_ShareLockPalette(ppdev->devinfo.hpalDefault);
- SURFACE_UnlockSurface(psurf);
+ SURFACE_ShareUnlockSurface(psurf);
return TRUE;
}
@@ -415,7 +415,7 @@
PSURFACE psurf;
PDEVOBJ* ppdev;
- psurf = SURFACE_LockSurface(hsurf);
+ psurf = SURFACE_ShareLockSurface(hsurf);
if (psurf == NULL)
{
return FALSE;
@@ -438,7 +438,7 @@
/* Get palette */
psurf->ppal = PALETTE_ShareLockPalette(ppdev->devinfo.hpalDefault);
- SURFACE_UnlockSurface(psurf);
+ SURFACE_ShareUnlockSurface(psurf);
return TRUE;
}
@@ -479,19 +479,17 @@
APIENTRY
EngLockSurface(IN HSURF hsurf)
{
- SURFACE *psurf = GDIOBJ_ShareLockObj(hsurf, GDI_OBJECT_TYPE_BITMAP);
-
- if (psurf != NULL)
- return &psurf->SurfObj;
-
- return NULL;
+ SURFACE *psurf = SURFACE_ShareLockSurface(hsurf);
+
+ return psurf ? &psurf->SurfObj : NULL;
}
VOID
APIENTRY
NtGdiEngUnlockSurface(IN SURFOBJ *pso)
{
- EngUnlockSurface(pso);
+ UNIMPLEMENTED;
+ ASSERT(FALSE);
}
VOID
@@ -501,7 +499,7 @@
if (pso != NULL)
{
SURFACE *psurf = CONTAINING_RECORD(pso, SURFACE, SurfObj);
- GDIOBJ_ShareUnlockObjByPtr((POBJ)psurf);
+ SURFACE_ShareUnlockSurface(psurf);
}
}