From 5d019367715778b726db87c5b4c02aecfff1b295 Mon Sep 17 00:00:00 2001 From: David Hammerton Date: Sat, 11 May 2002 22:51:34 +0000 Subject: [PATCH] Lock/unlock (and hence maybe coerce) DIBSections into GdiMod during the SetDIBits and GetDIBits functions, before actually accessing the X Pixmap. --- graphics/x11drv/dib.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/graphics/x11drv/dib.c b/graphics/x11drv/dib.c index 7ae43050d6..4981add446 100644 --- a/graphics/x11drv/dib.c +++ b/graphics/x11drv/dib.c @@ -4891,7 +4891,9 @@ INT X11DRV_SetDIBits( X11DRV_PDEVICE *physDev, HBITMAP hbitmap, UINT startscan, descr.height = lines; descr.useShm = FALSE; descr.dibpitch = ((descr.infoWidth * descr.infoBpp + 31) &~31) / 8; + X11DRV_DIB_Lock(bmp, DIB_Status_GdiMod, FALSE); result = X11DRV_DIB_SetImageBits( &descr ); + X11DRV_DIB_Unlock(bmp, TRUE); if (descr.colorMap) HeapFree(GetProcessHeap(), 0, descr.colorMap); @@ -5009,7 +5011,9 @@ INT X11DRV_GetDIBits( X11DRV_PDEVICE *physDev, HBITMAP hbitmap, UINT startscan, descr.dibpitch = dib ? (dib->dibSection.dsBm.bmWidthBytes) : (((descr.infoWidth * descr.infoBpp + 31) &~31) / 8); + X11DRV_DIB_Lock(bmp, DIB_Status_GdiMod, FALSE); X11DRV_DIB_GetImageBits( &descr ); + X11DRV_DIB_Unlock(bmp, TRUE); if(info->bmiHeader.biSizeImage == 0) /* Fill in biSizeImage */ info->bmiHeader.biSizeImage = DIB_GetDIBImageBytes( @@ -5646,7 +5650,7 @@ HBITMAP X11DRV_DIB_CreateDIBSection( INT effHeight, totalSize; BITMAP bm; LPVOID mapBits = NULL; - + TRACE("format (%ld,%ld), planes %d, bpp %d, size %ld, colors %ld (%s)\n", bi->biWidth, bi->biHeight, bi->biPlanes, bi->biBitCount, bi->biSizeImage, bi->biClrUsed, usage == DIB_PAL_COLORS? "PAL" : "RGB"); -- 2.32.0.93.g670b81a890