mirror of
https://github.com/mpv-player/mpv.git
synced 2024-09-20 12:02:23 +02:00
vo_opengl: cosmetics: flip the order of 2 functions
draw_frame() is called first, then flip_page(). Order them in the order they're called.
This commit is contained in:
parent
7c6d7017bd
commit
93f748e77f
@ -116,6 +116,22 @@ static void check_pattern(struct vo *vo, int item)
|
||||
}
|
||||
}
|
||||
|
||||
static void draw_frame(struct vo *vo, struct vo_frame *frame)
|
||||
{
|
||||
struct gl_priv *p = vo->priv;
|
||||
GL *gl = p->gl;
|
||||
|
||||
gl_video_render_frame(p->renderer, frame, 0);
|
||||
|
||||
// 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();
|
||||
|
||||
if (p->use_glFinish)
|
||||
gl->Finish();
|
||||
}
|
||||
|
||||
static void flip_page(struct vo *vo)
|
||||
{
|
||||
struct gl_priv *p = vo->priv;
|
||||
@ -149,22 +165,6 @@ static void flip_page(struct vo *vo)
|
||||
}
|
||||
}
|
||||
|
||||
static void draw_frame(struct vo *vo, struct vo_frame *frame)
|
||||
{
|
||||
struct gl_priv *p = vo->priv;
|
||||
GL *gl = p->gl;
|
||||
|
||||
gl_video_render_frame(p->renderer, frame, 0);
|
||||
|
||||
// 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();
|
||||
|
||||
if (p->use_glFinish)
|
||||
gl->Finish();
|
||||
}
|
||||
|
||||
static int query_format(struct vo *vo, int format)
|
||||
{
|
||||
struct gl_priv *p = vo->priv;
|
||||
|
Loading…
Reference in New Issue
Block a user