diff options
author | wm4 <wm4@nowhere> | 2015-10-30 20:26:43 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-10-30 20:26:43 +0100 |
commit | 93f748e77f1aeaeac3035552ed49aa33645bdfb0 (patch) | |
tree | 717538462f000678b83b936e592255b4058c8997 /video | |
parent | 7c6d7017bd661f9c560fdd2b7ab99e81ef32e633 (diff) | |
download | mpv-93f748e77f1aeaeac3035552ed49aa33645bdfb0.tar.bz2 mpv-93f748e77f1aeaeac3035552ed49aa33645bdfb0.tar.xz |
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.
Diffstat (limited to 'video')
-rw-r--r-- | video/out/vo_opengl.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/video/out/vo_opengl.c b/video/out/vo_opengl.c index 5440fa1af2..d55b5f5075 100644 --- a/video/out/vo_opengl.c +++ b/video/out/vo_opengl.c @@ -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; |