mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 22:41:43 +00:00
Use [NSGraphicsContext CGContext] instead of graphicsPort after Yosemite.
This commit is contained in:
parent
88c77eb7be
commit
e457a7823c
@ -134,8 +134,10 @@ gdk_surface_impl_quartz_get_context (GdkSurfaceImplQuartz *surface_impl,
|
|||||||
if (![surface_impl->view lockFocusIfCanDraw])
|
if (![surface_impl->view lockFocusIfCanDraw])
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
if (gdk_quartz_osx_version () < GDK_OSX_YOSEMITE)
|
||||||
cg_context = [[NSGraphicsContext currentContext] graphicsPort];
|
cg_context = [[NSGraphicsContext currentContext] graphicsPort];
|
||||||
|
else
|
||||||
|
cg_context = [[NSGraphicsContext currentContext] CGContext];
|
||||||
CGContextSaveGState (cg_context);
|
CGContextSaveGState (cg_context);
|
||||||
CGContextSetAllowsAntialiasing (cg_context, antialias);
|
CGContextSetAllowsAntialiasing (cg_context, antialias);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user