mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 07:13:01 +00:00
- don't use shared locks, when modifying bitmaps
- remove another reference to GDIOBJ_AllocObjDepricated svn path=/trunk/; revision=32745
This commit is contained in:
parent
9f99e0a7c4
commit
019b6f7ff8
2 changed files with 9 additions and 3 deletions
|
@ -298,11 +298,13 @@ IntCreateBitmap(IN SIZEL Size,
|
||||||
if (Format == 0)
|
if (Format == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
NewBitmap = BITMAPOBJ_AllocBitmapDepricated();
|
BitmapObj = BITMAPOBJ_AllocBitmapWithHandle();
|
||||||
if (NewBitmap == NULL)
|
if (BitmapObj == NULL)
|
||||||
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
NewBitmap = BitmapObj->BaseObject.hHmgr;
|
||||||
|
|
||||||
BitmapObj = BITMAPOBJ_LockBitmap(NewBitmap);
|
|
||||||
if (! BITMAPOBJ_InitBitsLock(BitmapObj))
|
if (! BITMAPOBJ_InitBitsLock(BitmapObj))
|
||||||
{
|
{
|
||||||
BITMAPOBJ_UnlockBitmap(BitmapObj);
|
BITMAPOBJ_UnlockBitmap(BitmapObj);
|
||||||
|
|
|
@ -34,8 +34,12 @@ typedef struct _BITMAPOBJ
|
||||||
|
|
||||||
/* NOTE: Use shared locks! */
|
/* NOTE: Use shared locks! */
|
||||||
#define BITMAPOBJ_LockBitmap(hBMObj) \
|
#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))
|
((PBITMAPOBJ) GDIOBJ_ShareLockObj ((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_BITMAP))
|
||||||
#define BITMAPOBJ_UnlockBitmap(pBMObj) \
|
#define BITMAPOBJ_UnlockBitmap(pBMObj) \
|
||||||
|
GDIOBJ_UnlockObjByPtr ((POBJ)pBMObj)
|
||||||
|
#define BITMAPOBJ_ShareUnlockBitmap(pBMObj) \
|
||||||
GDIOBJ_ShareUnlockObjByPtr ((POBJ)pBMObj)
|
GDIOBJ_ShareUnlockObjByPtr ((POBJ)pBMObj)
|
||||||
|
|
||||||
BOOL INTERNAL_CALL BITMAP_Cleanup(PVOID ObjectBody);
|
BOOL INTERNAL_CALL BITMAP_Cleanup(PVOID ObjectBody);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue