From: John Ralls Date: Sat, 11 Feb 2023 20:48:34 +0000 (-0800) Subject: [quartz] Set the sRGB colorspace on the IOSurface. X-Git-Tag: archive/raspbian/3.24.39-1+rpi1~1^2~65^2~1^2~11 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=312e5781f36e2014dc79ac4a82bea4f7fb57d9da;p=gtk%2B3.0.git [quartz] Set the sRGB colorspace on the IOSurface. Enables colorspace tranformation in Core Animation. This transform is executed on the GPU and unlike the Core Graphics one has no affect on performance. Fixes #5579 --- diff --git a/gdk/quartz/GdkQuartzView.c b/gdk/quartz/GdkQuartzView.c index 81c2d32007..f8c53841f3 100644 --- a/gdk/quartz/GdkQuartzView.c +++ b/gdk/quartz/GdkQuartzView.c @@ -548,6 +548,8 @@ copy_rectangle_argb32 (cairo_surface_t *dest, cairo_surface_t *source, -(void)createBackingStoreWithWidth: (CGFloat) width andHeight: (CGFloat) height { + IOSurfaceRef surface; + g_return_if_fail (width && height); CVPixelBufferRelease (pixels); @@ -555,6 +557,9 @@ copy_rectangle_argb32 (cairo_surface_t *dest, cairo_surface_t *source, kCVPixelFormatType_32BGRA, cfpb_props, &pixels); + surface = CVPixelBufferGetIOSurface (pixels); + IOSurfaceSetValue(surface, CFSTR("IOSurfaceColorSpace"), + kCGColorSpaceSRGB); } #if MAC_OS_X_VERSION_MIN_REQUIRED >= 10700