Use [NSGraphicsContext CGContext] instead of graphicsPort after Yosemite.

This commit is contained in:
John Ralls
2018-10-15 10:45:57 -07:00
parent 0e831b774c
commit 35d798dd31

View File

@@ -137,8 +137,10 @@ gdk_window_impl_quartz_get_context (GdkWindowImplQuartz *window_impl,
if (![window_impl->view lockFocusIfCanDraw])
return NULL;
}
cg_context = [[NSGraphicsContext currentContext] graphicsPort];
if (gdk_quartz_osx_version () < GDK_OSX_YOSEMITE)
cg_context = [[NSGraphicsContext currentContext] graphicsPort];
else
cg_context = [[NSGraphicsContext currentContext] CGContext];
CGContextSaveGState (cg_context);
CGContextSetAllowsAntialiasing (cg_context, antialias);