From e543853a7ff0ab4dcd4ccaf06c448013fd41c03a Mon Sep 17 00:00:00 2001 From: Akemi Date: Thu, 6 Oct 2016 19:21:21 +0200 Subject: cocoa: add glFlush() to cocoa backend The glFlush() call was made optional recently since it's not needed in most cases. On OSX though this is needed since we removed kCGLPFADoubleBuffer from the context creation, so the glFlush() call was added to the cocoa backend only. The CGLFlushDrawable() call can be safely removed since it only does something when a double buffered context is used. Also fixes a small typo. Fixes #3627. --- video/out/cocoa_common.m | 2 -- video/out/opengl/context_cocoa.c | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'video') diff --git a/video/out/cocoa_common.m b/video/out/cocoa_common.m index 9690ddb10f..ba241f42cc 100644 --- a/video/out/cocoa_common.m +++ b/video/out/cocoa_common.m @@ -718,8 +718,6 @@ void vo_cocoa_swap_buffers(struct vo *vo) if (skip) return; - 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 267c706d62..941274ce6c 100644 --- a/video/out/opengl/context_cocoa.c +++ b/video/out/opengl/context_cocoa.c @@ -153,6 +153,7 @@ static int cocoa_control(struct MPGLContext *ctx, int *events, int request, static void cocoa_swap_buffers(struct MPGLContext *ctx) { vo_cocoa_swap_buffers(ctx->vo); + ctx->gl->Flush(); } const struct mpgl_driver mpgl_driver_cocoa = { -- cgit v1.2.3