cocoa: re-enable double buffering

This causes a performance regression on 10.11 and newer, but the single
buffered method was broken and could cause partially rendered frames to
be presented to the screen.

This reverts 9f30cd8292 and
e543853a7f.
This commit is contained in:
James Ross-Gowan 2017-09-17 13:44:31 +10:00 committed by Niklas Haas
parent 75c0c06640
commit cee764849e
2 changed files with 3 additions and 2 deletions

View File

@ -811,6 +811,8 @@ 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;

View File

@ -72,6 +72,7 @@ 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
@ -155,9 +156,7 @@ static void cocoa_uninit(struct ra_ctx *ctx)
static void cocoa_swap_buffers(struct ra_ctx *ctx)
{
GL *gl = &p->gl;
vo_cocoa_swap_buffers(ctx->vo);
gl->Flush();
}
static bool cocoa_init(struct ra_ctx *ctx)