summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-03-11 00:44:27 +0100
committerwm4 <wm4@nowhere>2013-03-11 00:44:27 +0100
commitb1be668b9d6ccfc3e3af67eb52487d56c5d1f360 (patch)
tree6e87a4fab6011646b171d2c0aa4c563ca3203ec2 /video
parent89aae59e896b506292e7593044321713038e43c6 (diff)
downloadmpv-b1be668b9d6ccfc3e3af67eb52487d56c5d1f360.tar.bz2
mpv-b1be668b9d6ccfc3e3af67eb52487d56c5d1f360.tar.xz
vo_opengl: insert a magical glFlush call
Helps a little bit with stuttering with pans and "heavy" subtitles covering the screen.
Diffstat (limited to 'video')
-rw-r--r--video/out/vo_opengl.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/video/out/vo_opengl.c b/video/out/vo_opengl.c
index a53a1c90d2..398ad1b20b 100644
--- a/video/out/vo_opengl.c
+++ b/video/out/vo_opengl.c
@@ -1388,9 +1388,15 @@ static void draw_osd_cb(void *ctx, struct sub_bitmaps *imgs)
static void draw_osd(struct vo *vo, struct osd_state *osd)
{
struct gl_priv *p = vo->priv;
+ GL *gl = p->gl;
assert(p->osd);
osd_draw(osd, p->osd_rect, osd->vo_pts, 0, p->osd->formats, draw_osd_cb, p);
+
+ // The playloop calls this last before waiting some time until it decides
+ // to call flip_page(). Tell OpenGL to start execution of the GPU commands
+ // while we sleep (this happens asynchronously).
+ gl->Flush();
}
// Disable features that are not supported with the current OpenGL version.