Use [NSGraphicsContext CGContext] instead of graphicsPort after Yosemite.

This commit is contained in:
John Ralls 2018-10-15 10:45:57 -07:00
parent 88c77eb7be
commit e457a7823c

View File

@ -134,8 +134,10 @@ gdk_surface_impl_quartz_get_context (GdkSurfaceImplQuartz *surface_impl,
if (![surface_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);