Lock/unlock (and hence maybe coerce) DIBSections into GdiMod during
the SetDIBits and GetDIBits functions, before actually accessing the X Pixmap.
This commit is contained in:
parent
f85d8da425
commit
5d01936771
|
@ -4891,7 +4891,9 @@ INT X11DRV_SetDIBits( X11DRV_PDEVICE *physDev, HBITMAP hbitmap, UINT startscan,
|
||||||
descr.height = lines;
|
descr.height = lines;
|
||||||
descr.useShm = FALSE;
|
descr.useShm = FALSE;
|
||||||
descr.dibpitch = ((descr.infoWidth * descr.infoBpp + 31) &~31) / 8;
|
descr.dibpitch = ((descr.infoWidth * descr.infoBpp + 31) &~31) / 8;
|
||||||
|
X11DRV_DIB_Lock(bmp, DIB_Status_GdiMod, FALSE);
|
||||||
result = X11DRV_DIB_SetImageBits( &descr );
|
result = X11DRV_DIB_SetImageBits( &descr );
|
||||||
|
X11DRV_DIB_Unlock(bmp, TRUE);
|
||||||
|
|
||||||
if (descr.colorMap) HeapFree(GetProcessHeap(), 0, descr.colorMap);
|
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.dibpitch = dib ? (dib->dibSection.dsBm.bmWidthBytes)
|
||||||
: (((descr.infoWidth * descr.infoBpp + 31) &~31) / 8);
|
: (((descr.infoWidth * descr.infoBpp + 31) &~31) / 8);
|
||||||
|
|
||||||
|
X11DRV_DIB_Lock(bmp, DIB_Status_GdiMod, FALSE);
|
||||||
X11DRV_DIB_GetImageBits( &descr );
|
X11DRV_DIB_GetImageBits( &descr );
|
||||||
|
X11DRV_DIB_Unlock(bmp, TRUE);
|
||||||
|
|
||||||
if(info->bmiHeader.biSizeImage == 0) /* Fill in biSizeImage */
|
if(info->bmiHeader.biSizeImage == 0) /* Fill in biSizeImage */
|
||||||
info->bmiHeader.biSizeImage = DIB_GetDIBImageBytes(
|
info->bmiHeader.biSizeImage = DIB_GetDIBImageBytes(
|
||||||
|
|
Loading…
Reference in New Issue