[vlc-commits] opengl: move down vlc_gl_renderer_Prepare()

Romain Vimont git at videolan.org
Mon Mar 23 11:37:38 CET 2020


vlc | branch: master | Romain Vimont <rom1v at videolabs.io> | Fri Jan 31 13:05:29 2020 +0100| [b5a1afb2d61bedb859bb2099d60f646b826533b3] | committer: Jean-Baptiste Kempf

opengl: move down vlc_gl_renderer_Prepare()

It will be modified to depend on static functions. Move it below them.

This will make the diff more readable.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b5a1afb2d61bedb859bb2099d60f646b826533b3
---

 modules/video_output/opengl/renderer.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/modules/video_output/opengl/renderer.c b/modules/video_output/opengl/renderer.c
index 9f06c370b0..88e0e3e3f8 100644
--- a/modules/video_output/opengl/renderer.c
+++ b/modules/video_output/opengl/renderer.c
@@ -570,17 +570,6 @@ vlc_gl_renderer_SetWindowAspectRatio(struct vlc_gl_renderer *renderer,
     getViewpointMatrixes(renderer, renderer->fmt.projection_mode);
 }
 
-int
-vlc_gl_renderer_Prepare(struct vlc_gl_renderer *renderer, picture_t *picture)
-{
-    const struct vlc_gl_interop *interop = renderer->interop;
-    /* Update the texture */
-    return interop->ops->update_textures(interop, renderer->textures,
-                                         renderer->tex_width,
-                                         renderer->tex_height, picture,
-                                         NULL);
-}
-
 static int BuildSphere(GLfloat **vertexCoord, GLfloat **textureCoord, unsigned *nbVertices,
                        GLushort **indices, unsigned *nbIndices)
 {
@@ -920,6 +909,17 @@ static void DrawWithShaders(struct vlc_gl_renderer *renderer)
     vt->DrawElements(GL_TRIANGLES, renderer->nb_indices, GL_UNSIGNED_SHORT, 0);
 }
 
+int
+vlc_gl_renderer_Prepare(struct vlc_gl_renderer *renderer, picture_t *picture)
+{
+    const struct vlc_gl_interop *interop = renderer->interop;
+    /* Update the texture */
+    return interop->ops->update_textures(interop, renderer->textures,
+                                         renderer->tex_width,
+                                         renderer->tex_height, picture,
+                                         NULL);
+}
+
 int
 vlc_gl_renderer_Draw(struct vlc_gl_renderer *renderer,
                      const video_format_t *source)



More information about the vlc-commits mailing list