[gtk+/wip/chergert/quartz-frame-clock: 223/228] quartz: track private cairo patches



commit 9d878875b2ac923f8f372ecf7cd1682c1831fd72
Author: Christian Hergert <christian hergert me>
Date:   Fri Sep 11 15:05:36 2015 -0700

    quartz: track private cairo patches

 gdk/quartz/gdkwindow-quartz.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c
index 0074267..6f427f9 100644
--- a/gdk/quartz/gdkwindow-quartz.c
+++ b/gdk/quartz/gdkwindow-quartz.c
@@ -3047,25 +3047,25 @@ static CGContextRef
 gdk_root_window_impl_quartz_get_context (GdkWindowImplQuartz *window,
                                          gboolean             antialias)
 {
-  CGColorSpaceRef colorspace;
+  CGColorSpaceRef colorSpace;
   CGContextRef cg_context;
   GdkWindowImplQuartz *window_impl = GDK_WINDOW_IMPL_QUARTZ (window);
-  CMProfileRef prof;
 
   if (GDK_WINDOW_DESTROYED (window_impl->wrapper))
     return NULL;
 
-  CMGetSystemProfile (&prof);
-  colorspace = CGColorSpaceCreateWithPlatformColorSpace (prof);
+  colorSpace = CGDisplayCopyColorSpace (CGMainDisplayID ());
+  if (!colorSpace)
+    colorSpace = CGColorSpaceCreateDeviceRGB ();
 
   /* We do not have the notion of a root window on OS X.  We fake this
    * by creating a 1x1 bitmap and return a context to that.
    */
   cg_context = CGBitmapContextCreate (NULL,
-                                      1, 1, 8, 4, colorspace,
+                                      1, 1, 8, 4, colorSpace,
                                       kCGBitmapByteOrder32Host|kCGImageAlphaPremultipliedLast);
 
-  CGColorSpaceRelease (colorspace);
+  CGColorSpaceRelease (colorSpace);
 
   return cg_context;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]