From 019b6f7ff8185b97b17d8b7ea603a04872968db2 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sat, 22 Mar 2008 03:14:57 +0000 Subject: [PATCH] - don't use shared locks, when modifying bitmaps - remove another reference to GDIOBJ_AllocObjDepricated svn path=/trunk/; revision=32745 --- reactos/subsystems/win32/win32k/eng/surface.c | 8 +++++--- reactos/subsystems/win32/win32k/include/bitmaps.h | 4 ++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/reactos/subsystems/win32/win32k/eng/surface.c b/reactos/subsystems/win32/win32k/eng/surface.c index 9a093893233..686a18a73d2 100644 --- a/reactos/subsystems/win32/win32k/eng/surface.c +++ b/reactos/subsystems/win32/win32k/eng/surface.c @@ -298,11 +298,13 @@ IntCreateBitmap(IN SIZEL Size, if (Format == 0) return 0; - NewBitmap = BITMAPOBJ_AllocBitmapDepricated(); - if (NewBitmap == NULL) + BitmapObj = BITMAPOBJ_AllocBitmapWithHandle(); + if (BitmapObj == NULL) + { return 0; + } + NewBitmap = BitmapObj->BaseObject.hHmgr; - BitmapObj = BITMAPOBJ_LockBitmap(NewBitmap); if (! BITMAPOBJ_InitBitsLock(BitmapObj)) { BITMAPOBJ_UnlockBitmap(BitmapObj); diff --git a/reactos/subsystems/win32/win32k/include/bitmaps.h b/reactos/subsystems/win32/win32k/include/bitmaps.h index 618f611fb50..5324d475883 100644 --- a/reactos/subsystems/win32/win32k/include/bitmaps.h +++ b/reactos/subsystems/win32/win32k/include/bitmaps.h @@ -34,8 +34,12 @@ typedef struct _BITMAPOBJ /* NOTE: Use shared locks! */ #define BITMAPOBJ_LockBitmap(hBMObj) \ + ((PBITMAPOBJ) GDIOBJ_LockObj ((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_BITMAP)) +#define BITMAPOBJ_ShareLockBitmap(hBMObj) \ ((PBITMAPOBJ) GDIOBJ_ShareLockObj ((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_BITMAP)) #define BITMAPOBJ_UnlockBitmap(pBMObj) \ + GDIOBJ_UnlockObjByPtr ((POBJ)pBMObj) +#define BITMAPOBJ_ShareUnlockBitmap(pBMObj) \ GDIOBJ_ShareUnlockObjByPtr ((POBJ)pBMObj) BOOL INTERNAL_CALL BITMAP_Cleanup(PVOID ObjectBody);