aboutsummaryrefslogtreecommitdiffstats
path: root/pugl/pugl_osx.m
diff options
context:
space:
mode:
Diffstat (limited to 'pugl/pugl_osx.m')
-rw-r--r--pugl/pugl_osx.m12
1 files changed, 6 insertions, 6 deletions
diff --git a/pugl/pugl_osx.m b/pugl/pugl_osx.m
index c5a94f8..82bc9a6 100644
--- a/pugl/pugl_osx.m
+++ b/pugl/pugl_osx.m
@@ -740,21 +740,21 @@ puglInitInternals(void)
}
void
-puglEnterContext(PuglView* view)
+puglEnterContext(PuglView* view, bool PUGL_UNUSED(drawing))
{
[[view->impl->glview openGLContext] makeCurrentContext];
}
void
-puglLeaveContext(PuglView* view, bool flush)
+puglLeaveContext(PuglView* view, bool drawing)
{
+ if (drawing) {
#ifdef PUGL_HAVE_CAIRO
- if (view->ctx_type & PUGL_CAIRO) {
- pugl_cairo_gl_draw(&view->impl->cairo_gl, view->width, view->height);
- }
+ if (view->ctx_type & PUGL_CAIRO) {
+ pugl_cairo_gl_draw(&view->impl->cairo_gl, view->width, view->height);
+ }
#endif
- if (flush) {
[[view->impl->glview openGLContext] flushBuffer];
}