From fab0448c5ebb163daf5a116eef6eb4c8596071d7 Mon Sep 17 00:00:00 2001 From: James Ross-Gowan Date: Fri, 22 Sep 2017 23:08:46 +1000 Subject: Revert "cocoa: re-enable double buffering" Enabling double buffering fixed some graphical glitches when entering fullscreen, but it also caused a fullscreen performance regression. We decided that the glitches were preferable to the performance regression. This reverts commit cee764849e4fe22b00fb3f31838a63906e2e0d54. --- video/out/cocoa_common.m | 2 -- video/out/opengl/context_cocoa.c | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'video') diff --git a/video/out/cocoa_common.m b/video/out/cocoa_common.m index 8f09c25b91..abead0fb53 100644 --- a/video/out/cocoa_common.m +++ b/video/out/cocoa_common.m @@ -811,8 +811,6 @@ void vo_cocoa_swap_buffers(struct vo *vo) } pthread_mutex_unlock(&s->sync_lock); - CGLFlushDrawable(s->cgl_ctx); - pthread_mutex_lock(&s->lock); s->frame_w = vo->dwidth; s->frame_h = vo->dheight; diff --git a/video/out/opengl/context_cocoa.c b/video/out/opengl/context_cocoa.c index 6d3d8282e1..2256d31b67 100644 --- a/video/out/opengl/context_cocoa.c +++ b/video/out/opengl/context_cocoa.c @@ -72,7 +72,6 @@ static CGLError test_gl_version(struct ra_ctx *ctx, CGLOpenGLProfile ver) // rejected attribute to preserve the fallback code kCGLPFAOpenGLProfile, (CGLPixelFormatAttribute) ver, - kCGLPFADoubleBuffer, kCGLPFAAccelerated, kCGLPFAAllowOfflineRenderers, // keep this one last to apply the cocoa-force-dedicated-gpu option @@ -156,7 +155,10 @@ static void cocoa_uninit(struct ra_ctx *ctx) static void cocoa_swap_buffers(struct ra_ctx *ctx) { + struct priv *p = ctx->priv; + GL *gl = &p->gl; vo_cocoa_swap_buffers(ctx->vo); + gl->Flush(); } static bool cocoa_init(struct ra_ctx *ctx) -- cgit v1.2.3