Brendan Shanks (@bshanks) commented about dlls/winemac.drv/surface.c:
+ BYTE *dst = IOSurfaceGetBaseAddress(io_surface); + UINT x, y; + UINT src_row_bytes = shape_info->bmiHeader.biSizeImage / abs(shape_info->bmiHeader.biHeight); + + for (y = 0; y < IOSurfaceGetHeight(io_surface); y++) + { + const BYTE *src_row = src + y * src_row_bytes; + BYTE *dst_row = dst + y * IOSurfaceGetBytesPerRow(io_surface); + for (x = 0; x < IOSurfaceGetWidth(io_surface); x++) + { + BYTE bit = (src_row[x / 8] >> (7 - (x % 8))) & 1; + dst_row[x * 4] = bit ? 0 : 255; + } + } + } + } Need to lock/unlock `io_surface` around this whole block
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/7938#note_104283