diff --git a/reactos/subsystems/win32/win32k/eng/bitblt.c b/reactos/subsystems/win32/win32k/eng/bitblt.c index 6b6ee51f9f1..2c620ca2207 100644 --- a/reactos/subsystems/win32/win32k/eng/bitblt.c +++ b/reactos/subsystems/win32/win32k/eng/bitblt.c @@ -66,7 +66,7 @@ BltMask(SURFOBJ* psoDest, pebo = CONTAINING_RECORD(pbo, EBRUSHOBJ, BrushObject); hbmPattern = EBRUSHOBJ_pvGetEngBrush(pebo); - psurfPattern = SURFACE_LockSurface(hbmPattern); + psurfPattern = SURFACE_ShareLockSurface(hbmPattern); if (psurfPattern != NULL) { psoPattern = &psurfPattern->SurfObj; @@ -168,7 +168,7 @@ BltMask(SURFOBJ* psoDest, } if (psurfPattern) - SURFACE_UnlockSurface(psurfPattern); + SURFACE_ShareUnlockSurface(psurfPattern); return TRUE; } @@ -230,7 +230,7 @@ CallDibBitBlt(SURFOBJ* OutputObj, { GdiBrush = CONTAINING_RECORD(pbo, EBRUSHOBJ, BrushObject); hbmPattern = EBRUSHOBJ_pvGetEngBrush(GdiBrush); - psurfPattern = SURFACE_LockSurface(hbmPattern); + psurfPattern = SURFACE_ShareLockSurface(hbmPattern); if (psurfPattern) { BltInfo.PatternSurface = &psurfPattern->SurfObj; @@ -250,7 +250,7 @@ CallDibBitBlt(SURFOBJ* OutputObj, /* Pattern brush */ if (psurfPattern) { - SURFACE_UnlockSurface(psurfPattern); + SURFACE_ShareUnlockSurface(psurfPattern); } return Result; diff --git a/reactos/subsystems/win32/win32k/eng/stretchblt.c b/reactos/subsystems/win32/win32k/eng/stretchblt.c index 1b4a7f99ea6..e18086d013a 100644 --- a/reactos/subsystems/win32/win32k/eng/stretchblt.c +++ b/reactos/subsystems/win32/win32k/eng/stretchblt.c @@ -55,7 +55,7 @@ CallDibStretchBlt(SURFOBJ* psoDest, { GdiBrush = CONTAINING_RECORD(pbo, EBRUSHOBJ, BrushObject); hbmPattern = EBRUSHOBJ_pvGetEngBrush(GdiBrush); - psurfPattern = SURFACE_LockSurface(hbmPattern); + psurfPattern = SURFACE_ShareLockSurface(hbmPattern); if (psurfPattern) { PatternSurface = &psurfPattern->SurfObj; @@ -78,7 +78,7 @@ CallDibStretchBlt(SURFOBJ* psoDest, /* Pattern brush */ if (psurfPattern) { - SURFACE_UnlockSurface(psurfPattern); + SURFACE_ShareUnlockSurface(psurfPattern); } return bResult; diff --git a/reactos/subsystems/win32/win32k/ntuser/clipboard.c b/reactos/subsystems/win32/win32k/ntuser/clipboard.c index 121d7af06ae..1c4e64670b3 100644 --- a/reactos/subsystems/win32/win32k/ntuser/clipboard.c +++ b/reactos/subsystems/win32/win32k/ntuser/clipboard.c @@ -984,11 +984,11 @@ NtUserSetClipboardData(UINT uFormat, HANDLE hMem, DWORD size) hdc = UserGetDCEx(NULL, NULL, DCX_USESTYLE); - psurf = SURFACE_LockSurface(hMem); + psurf = SURFACE_ShareLockSurface(hMem); BITMAP_GetObject(psurf, sizeof(BITMAP), (PVOID)&bm); if(psurf) { - SURFACE_UnlockSurface(psurf); + SURFACE_ShareUnlockSurface(psurf); } bi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); diff --git a/reactos/subsystems/win32/win32k/ntuser/cursoricon.c b/reactos/subsystems/win32/win32k/ntuser/cursoricon.c index d0322c72b5c..131d912cfc0 100644 --- a/reactos/subsystems/win32/win32k/ntuser/cursoricon.c +++ b/reactos/subsystems/win32/win32k/ntuser/cursoricon.c @@ -508,11 +508,11 @@ NtUserGetIconInfo( { PSURFACE psurfBmp; - psurfBmp = SURFACE_LockSurface(CurIcon->IconInfo.hbmColor); + psurfBmp = SURFACE_ShareLockSurface(CurIcon->IconInfo.hbmColor); if (psurfBmp) { colorBpp = BitsPerFormat(psurfBmp->SurfObj.iBitmapFormat); - SURFACE_UnlockSurface(psurfBmp); + SURFACE_ShareUnlockSurface(psurfBmp); } } @@ -1197,7 +1197,7 @@ UserDrawIconEx( /* In order to correctly display 32 bit icons Windows first scans the image, because information about transparency is not stored in any image's headers */ - psurfOff = SURFACE_LockSurface(hbmColor); + psurfOff = SURFACE_ShareLockSurface(hbmColor); if (psurfOff) { fnSource_GetPixel = DibFunctionsForBitmapFormat[psurfOff->SurfObj.iBitmapFormat].DIB_GetPixel; @@ -1215,7 +1215,7 @@ UserDrawIconEx( break; } } - SURFACE_UnlockSurface(psurfOff); + SURFACE_ShareUnlockSurface(psurfOff); } } @@ -1272,7 +1272,7 @@ UserDrawIconEx( goto CleanupAlpha; } - psurf = SURFACE_LockSurface(hMemBmp); + psurf = SURFACE_ShareLockSurface(hMemBmp); if(!psurf) { DPRINT1("SURFACE_LockSurface failed!\n"); @@ -1294,7 +1294,7 @@ UserDrawIconEx( } } - SURFACE_UnlockSurface(psurf); + SURFACE_ShareUnlockSurface(psurf); hTmpBmp = NtGdiSelectBitmap(hMemDC, hMemBmp); diff --git a/reactos/subsystems/win32/win32k/ntuser/sysparams.c b/reactos/subsystems/win32/win32k/ntuser/sysparams.c index f4f6dfbb688..518eb9955d5 100644 --- a/reactos/subsystems/win32/win32k/ntuser/sysparams.c +++ b/reactos/subsystems/win32/win32k/ntuser/sysparams.c @@ -634,7 +634,7 @@ SpiSetWallpaper(PVOID pvParam, FLONG fl) } /* Try to get the size of the wallpaper */ - if(!(psurfBmp = SURFACE_LockSurface(hbmp))) + if(!(psurfBmp = SURFACE_ShareLockSurface(hbmp))) { GreDeleteObject(hbmp); return 0; @@ -644,7 +644,7 @@ SpiSetWallpaper(PVOID pvParam, FLONG fl) gpwinstaCurrent->cyWallpaper = psurfBmp->SurfObj.sizlBitmap.cy; gpwinstaCurrent->WallpaperMode = wmCenter; - SURFACE_UnlockSurface(psurfBmp); + SURFACE_ShareUnlockSurface(psurfBmp); /* Change the bitmap's ownership */ GDIOBJ_SetOwnership(hbmp, NULL); @@ -907,7 +907,7 @@ SpiGetSet(UINT uiAction, UINT uiParam, PVOID pvParam, FLONG fl) case SPI_SETWORKAREA: { - /*FIXME: we should set the work area of the monitor + /*FIXME: we should set the work area of the monitor that contains the specified rectangle*/ PMONITOR pmonitor = IntGetPrimaryMonitor(); RECT rcWorkArea; diff --git a/reactos/subsystems/win32/win32k/objects/bitmaps.c b/reactos/subsystems/win32/win32k/objects/bitmaps.c index 4d17fecf827..f99d1b4eab5 100644 --- a/reactos/subsystems/win32/win32k/objects/bitmaps.c +++ b/reactos/subsystems/win32/win32k/objects/bitmaps.c @@ -270,7 +270,7 @@ IntCreateCompatibleBitmap( 1, dibs.dsBm.bmBitsPixel, NULL); - psurfBmp = SURFACE_LockSurface(Bmp); + psurfBmp = SURFACE_ShareLockSurface(Bmp); ASSERT(psurfBmp); /* Assign palette */ psurfBmp->ppal = psurf->ppal; @@ -278,7 +278,7 @@ IntCreateCompatibleBitmap( /* Set flags */ psurfBmp->flags = API_BITMAP; psurfBmp->hdc = NULL; // Fixme - SURFACE_UnlockSurface(psurfBmp); + SURFACE_ShareUnlockSurface(psurfBmp); } else if (Count == sizeof(DIBSECTION)) { @@ -316,7 +316,7 @@ IntCreateCompatibleBitmap( return 0; } - PalGDI = PALETTE_LockPalette(psurf->ppal->BaseObject.hHmgr); + PalGDI = PALETTE_ShareLockPalette(psurf->ppal->BaseObject.hHmgr); for (Index = 0; Index < 256 && Index < PalGDI->NumColors; @@ -327,7 +327,7 @@ IntCreateCompatibleBitmap( bi->bmiColors[Index].rgbBlue = PalGDI->IndexedColors[Index].peBlue; bi->bmiColors[Index].rgbReserved = 0; } - PALETTE_UnlockPalette(PalGDI); + PALETTE_ShareUnlockPalette(PalGDI); } Bmp = DIB_CreateDIBSection(Dc, @@ -390,7 +390,7 @@ NtGdiGetBitmapDimension( if (hBitmap == NULL) return FALSE; - psurfBmp = SURFACE_LockSurface(hBitmap); + psurfBmp = SURFACE_ShareLockSurface(hBitmap); if (psurfBmp == NULL) { EngSetLastError(ERROR_INVALID_HANDLE); @@ -408,7 +408,7 @@ NtGdiGetBitmapDimension( } _SEH2_END - SURFACE_UnlockSurface(psurfBmp); + SURFACE_ShareUnlockSurface(psurfBmp); return Ret; } @@ -496,12 +496,12 @@ NtGdiGetPixel(HDC hDC, INT XPos, INT YPos) NtGdiSelectBitmap(hDCTmp, hBmpOld); // our bitmap is no longer selected, so we can access it's stuff... - psurf = SURFACE_LockSurface(hBmpTmp); + psurf = SURFACE_ShareLockSurface(hBmpTmp); if (psurf) { // Dont you need to convert something here? Result = *(COLORREF*)psurf->SurfObj.pvScan0; - SURFACE_UnlockSurface(psurf); + SURFACE_ShareUnlockSurface(psurf); } } GreDeleteObject(hBmpTmp); @@ -598,7 +598,7 @@ NtGdiGetBitmapBits( return 0; } - psurf = SURFACE_LockSurface(hBitmap); + psurf = SURFACE_ShareLockSurface(hBitmap); if (!psurf) { EngSetLastError(ERROR_INVALID_HANDLE); @@ -612,7 +612,7 @@ NtGdiGetBitmapBits( /* If the bits vector is null, the function should return the read size */ if (pUnsafeBits == NULL) { - SURFACE_UnlockSurface(psurf); + SURFACE_ShareUnlockSurface(psurf); return bmSize; } @@ -632,7 +632,7 @@ NtGdiGetBitmapBits( } _SEH2_END - SURFACE_UnlockSurface(psurf); + SURFACE_ShareUnlockSurface(psurf); return ret; } @@ -652,7 +652,7 @@ NtGdiSetBitmapBits( return 0; } - psurf = SURFACE_LockSurface(hBitmap); + psurf = SURFACE_ShareLockSurface(hBitmap); if (psurf == NULL) { EngSetLastError(ERROR_INVALID_HANDLE); @@ -671,7 +671,7 @@ NtGdiSetBitmapBits( } _SEH2_END - SURFACE_UnlockSurface(psurf); + SURFACE_ShareUnlockSurface(psurf); return ret; } @@ -689,7 +689,7 @@ NtGdiSetBitmapDimension( if (hBitmap == NULL) return FALSE; - psurf = SURFACE_LockSurface(hBitmap); + psurf = SURFACE_ShareLockSurface(hBitmap); if (psurf == NULL) { EngSetLastError(ERROR_INVALID_HANDLE); @@ -714,7 +714,7 @@ NtGdiSetBitmapDimension( psurf->sizlDim.cx = Width; psurf->sizlDim.cy = Height; - SURFACE_UnlockSurface(psurf); + SURFACE_ShareUnlockSurface(psurf); return Ret; } @@ -998,11 +998,11 @@ NtGdiGetDCforBitmap( IN HBITMAP hsurf) { HDC hdc = NULL; - PSURFACE psurf = SURFACE_LockSurface(hsurf); + PSURFACE psurf = SURFACE_ShareLockSurface(hsurf); if (psurf) { hdc = psurf->hdc; - SURFACE_UnlockSurface(psurf); + SURFACE_ShareUnlockSurface(psurf); } return hdc; } diff --git a/reactos/subsystems/win32/win32k/objects/dibobj.c b/reactos/subsystems/win32/win32k/objects/dibobj.c index dfd45ee1541..452e03d13fc 100644 --- a/reactos/subsystems/win32/win32k/objects/dibobj.c +++ b/reactos/subsystems/win32/win32k/objects/dibobj.c @@ -164,7 +164,7 @@ IntSetDIBColorTable( return 0; } - PalGDI = PALETTE_LockPalette(psurf->ppal->BaseObject.hHmgr); + PalGDI = PALETTE_ShareLockPalette(psurf->ppal->BaseObject.hHmgr); for (Index = StartIndex; Index < StartIndex + Entries && Index < PalGDI->NumColors; @@ -174,7 +174,7 @@ IntSetDIBColorTable( PalGDI->IndexedColors[Index].peGreen = Colors[Index - StartIndex].rgbGreen; PalGDI->IndexedColors[Index].peBlue = Colors[Index - StartIndex].rgbBlue; } - PALETTE_UnlockPalette(PalGDI); + PALETTE_ShareUnlockPalette(PalGDI); } else Entries = 0; @@ -277,8 +277,8 @@ IntSetDIBits( bmi->bmiHeader.biHeight, bmi->bmiHeader.biBitCount)); - psurfDst = SURFACE_LockSurface(hBitmap); - psurfSrc = SURFACE_LockSurface(SourceBitmap); + psurfDst = SURFACE_ShareLockSurface(hBitmap); + psurfSrc = SURFACE_ShareLockSurface(SourceBitmap); if(!(psurfSrc && psurfDst)) { @@ -311,11 +311,11 @@ IntSetDIBits( cleanup: if(psurfSrc) { - SURFACE_UnlockSurface(psurfSrc); + SURFACE_ShareUnlockSurface(psurfSrc); } if(psurfDst) { - SURFACE_UnlockSurface(psurfDst); + SURFACE_ShareUnlockSurface(psurfDst); } GreDeleteObject(SourceBitmap); @@ -766,7 +766,7 @@ NtGdiGetDIBitsInternal( /* For color DDBs in native depth (mono DDBs always have a black/white palette): Generate the color map from the selected palette */ - PPALETTE pDcPal = PALETTE_LockPalette(pDC->dclevel.hpal); + PPALETTE pDcPal = PALETTE_ShareLockPalette(pDC->dclevel.hpal); if(!pDcPal) { ScanLines = 0 ; @@ -786,7 +786,7 @@ NtGdiGetDIBitsInternal( rgbQuads[i].rgbBlue = pDcPal->IndexedColors[i].peBlue; rgbQuads[i].rgbReserved = 0; } - PALETTE_UnlockPalette(pDcPal); + PALETTE_ShareUnlockPalette(pDcPal); } else { @@ -1548,10 +1548,10 @@ DIB_CreateDIBSection( { if(dc) { - PPALETTE pdcPal ; - pdcPal = PALETTE_LockPalette(dc->dclevel.hpal); - hpal = DIB_MapPaletteColors(pdcPal, bmi); - PALETTE_UnlockPalette(pdcPal); + PPALETTE ppalDc; + ppalDc = PALETTE_ShareLockPalette(dc->dclevel.hpal); + hpal = DIB_MapPaletteColors(ppalDc, bmi); + PALETTE_ShareUnlockPalette(ppalDc); } else { diff --git a/reactos/subsystems/win32/win32k/objects/icm.c b/reactos/subsystems/win32/win32k/objects/icm.c index 104cefa99a7..f67ff9ca61a 100644 --- a/reactos/subsystems/win32/win32k/objects/icm.c +++ b/reactos/subsystems/win32/win32k/objects/icm.c @@ -251,7 +251,7 @@ UpdateDeviceGammaRamp( HDEV hPDev ) if (!(pGDev->flFlags & PDEV_GAMMARAMP_TABLE)) return FALSE; - palGDI = PALETTE_LockPalette(pGDev->devinfo.hpalDefault); + palGDI = PALETTE_ShareLockPalette(pGDev->devinfo.hpalDefault); if(!palGDI) return FALSE; palPtr = (PALOBJ*) palGDI; @@ -272,7 +272,7 @@ UpdateDeviceGammaRamp( HDEV hPDev ) 0, palGDI->NumColors); } - PALETTE_UnlockPalette(palGDI); + PALETTE_ShareUnlockPalette(palGDI); return Ret; } else