winemac: Interpret Windows bitmap data, especially window surfaces, as sRGB.

This makes the display match that of native apps.  For example, the UI of Mac
Steam vs. Windows Steam or a PNG shown in iexplore.exe vs. Preview.

Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Ken Thomases 2018-07-15 13:52:57 -05:00 committed by Alexandre Julliard
parent ed7e057388
commit 650997d71d
3 changed files with 3 additions and 3 deletions

View File

@ -85,7 +85,7 @@ CGImageRef create_cgimage_from_icon_bitmaps(HDC hdc, HANDLE icon, HBITMAP hbmCol
else
alpha_format = kCGImageAlphaNoneSkipFirst;
colorspace = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB);
colorspace = CGColorSpaceCreateWithName(kCGColorSpaceSRGB);
if (!colorspace)
{
WARN("failed to create colorspace\n");

View File

@ -357,7 +357,7 @@ CFArrayRef create_monochrome_cursor(HDC hdc, const ICONINFOEXW *icon, int width,
for (i = 0; i < count; i++)
data_bits[i] ^= xor_bits[i];
colorspace = CGColorSpaceCreateWithName(kCGColorSpaceGenericGray);
colorspace = CGColorSpaceCreateWithName(kCGColorSpaceGenericGrayGamma2_2);
if (!colorspace)
{
WARN("failed to create colorspace\n");

View File

@ -384,7 +384,7 @@ CGImageRef create_surface_image(void *window_surface, CGRect *rect, int copy_dat
visrect = CGRectOffset(*rect, -surface->header.rect.left, -surface->header.rect.top);
colorspace = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB);
colorspace = CGColorSpaceCreateWithName(kCGColorSpaceSRGB);
bytes_per_row = get_dib_stride(width, 32);
offset = CGRectGetMinX(visrect) * 4 + (height - CGRectGetMaxY(visrect)) * bytes_per_row;
size = min(CGRectGetHeight(visrect) * bytes_per_row,