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.
This commit is contained in:
Akemi 2016-10-06 19:21:21 +02:00 committed by wm4
parent 9340f19ba2
commit e543853a7f
3 changed files with 2 additions and 3 deletions

View File

@ -4593,7 +4593,7 @@ The following video options are currently all specific to ``--vo=opengl`` and
``--opengl-early-flush=<yes|no>``
Call ``glFlush()`` after rendering a frame and before attempting to display
it (default: no). Can fix stuttering in some causes, in other cases probably
it (default: no). Can fix stuttering in some cases, in other cases probably
causes it. For testing - could be removed any time.
Miscellaneous

View File

@ -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;

View File

@ -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 = {