mirror of https://github.com/mpv-player/mpv
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 reverts9f30cd8292
ande543853a7f
.
This commit is contained in:
parent
75c0c06640
commit
cee764849e
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue