We don't want to risk having something really weird come out if we have a
WCG colorspace, so instead only do the performance hack on systems where
the output is likely reasonable.
We will want to eventually just be drawing in the appropriate colorspace,
but that is not available yet.
monitor = _gdk_macos_surface_get_best_monitor ([self gdkSurface]);
rgb = _gdk_macos_monitor_copy_colorspace (GDK_MACOS_MONITOR (monitor));
+ /* If we have an WCG colorspace, just take the slow path or we risk
+ * really screwing things up.
+ */
+ if (CGColorSpaceIsWideGamutRGB (rgb))
+ {
+ CGColorSpaceRelease (rgb);
+ rgb = CGColorSpaceCreateDeviceRGB ();
+ }
+
/* Assert that our image surface was created correctly with
* 16-byte aligned pointers and strides. This is needed to
* ensure that we're working with fast paths in CoreGraphics.