[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
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user