mirror of https://github.com/mpv-player/mpv
vo_opengl: insert a magical glFlush call
Helps a little bit with stuttering with pans and "heavy" subtitles covering the screen.
This commit is contained in:
parent
89aae59e89
commit
b1be668b9d
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue