Brendan Shanks (@bshanks) commented about dlls/winemac.drv/surface.c:
- CGImageRelease(image);
- /* First only copy the RBG componenets from color_bits as it uses BGRX */
- {
vImage_Buffer src = {.data = color_bits,.height = IOSurfaceGetHeight(io_surface),.width = IOSurfaceGetWidth(io_surface),.rowBytes = IOSurfaceGetBytesPerRow(io_surface),};vImage_Buffer dst = {.data = IOSurfaceGetBaseAddress(io_surface),.height = IOSurfaceGetHeight(io_surface),.width = IOSurfaceGetWidth(io_surface),.rowBytes = IOSurfaceGetBytesPerRow(io_surface),};vImageSelectChannels_ARGB8888(&src, &dst, &dst, 0x8 | 0x4 | 0x2, kvImageNoFlags);
Need to unlock/lock `io_surface` around this call