[vlc-devel] [PATCH 13/41] opengl: remove unused source format parameter

Romain Vimont rom1v at videolabs.io
Fri Feb 7 17:41:59 CET 2020


The video_format_t parameter of vout_display_opengl_Display() is not
used anymore. Remove it.
---
 modules/video_output/opengl/display.c     | 2 +-
 modules/video_output/opengl/renderer.c    | 4 +---
 modules/video_output/opengl/renderer.h    | 3 +--
 modules/video_output/opengl/vout_helper.c | 5 ++---
 modules/video_output/opengl/vout_helper.h | 3 +--
 modules/video_output/win32/glwin32.c      | 2 +-
 6 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/modules/video_output/opengl/display.c b/modules/video_output/opengl/display.c
index 1afd227bf6..ebb313926a 100644
--- a/modules/video_output/opengl/display.c
+++ b/modules/video_output/opengl/display.c
@@ -201,7 +201,7 @@ static void PictureDisplay (vout_display_t *vd, picture_t *pic)
             sys->place_changed = false;
         }
 
-        vout_display_opengl_Display (sys->vgl, &vd->source);
+        vout_display_opengl_Display(sys->vgl);
         vlc_gl_ReleaseCurrent (sys->gl);
     }
 }
diff --git a/modules/video_output/opengl/renderer.c b/modules/video_output/opengl/renderer.c
index 41b9fee413..3aaf3b59b9 100644
--- a/modules/video_output/opengl/renderer.c
+++ b/modules/video_output/opengl/renderer.c
@@ -1003,10 +1003,8 @@ vlc_gl_renderer_Prepare(struct vlc_gl_renderer *renderer, picture_t *picture)
 }
 
 int
-vlc_gl_renderer_Draw(struct vlc_gl_renderer *renderer,
-                     const video_format_t *source)
+vlc_gl_renderer_Draw(struct vlc_gl_renderer *renderer)
 {
-    (void) source;
     const opengl_vtable_t *vt = renderer->vt;
 
     vt->Clear(GL_COLOR_BUFFER_BIT);
diff --git a/modules/video_output/opengl/renderer.h b/modules/video_output/opengl/renderer.h
index 39ec2a98a0..8151045eb4 100644
--- a/modules/video_output/opengl/renderer.h
+++ b/modules/video_output/opengl/renderer.h
@@ -197,8 +197,7 @@ vlc_gl_renderer_Prepare(struct vlc_gl_renderer *renderer, picture_t *picture);
  * \param sr the renderer
  */
 int
-vlc_gl_renderer_Draw(struct vlc_gl_renderer *renderer,
-                     const video_format_t *source);
+vlc_gl_renderer_Draw(struct vlc_gl_renderer *renderer);
 
 int
 vlc_gl_renderer_SetViewpoint(struct vlc_gl_renderer *renderer,
diff --git a/modules/video_output/opengl/vout_helper.c b/modules/video_output/opengl/vout_helper.c
index 7ab97a8462..1d282ebee6 100644
--- a/modules/video_output/opengl/vout_helper.c
+++ b/modules/video_output/opengl/vout_helper.c
@@ -229,8 +229,7 @@ int vout_display_opengl_Prepare(vout_display_opengl_t *vgl,
     GL_ASSERT_NOERROR();
     return ret;
 }
-int vout_display_opengl_Display(vout_display_opengl_t *vgl,
-                                const video_format_t *source)
+int vout_display_opengl_Display(vout_display_opengl_t *vgl)
 {
     GL_ASSERT_NOERROR();
 
@@ -238,7 +237,7 @@ int vout_display_opengl_Display(vout_display_opengl_t *vgl,
        OpenGL providers can call vout_display_opengl_Display to force redraw.
        Currently, the OS X provider uses it to get a smooth window resizing */
 
-    int ret = vlc_gl_renderer_Draw(vgl->renderer, source);
+    int ret = vlc_gl_renderer_Draw(vgl->renderer);
     if (ret != VLC_SUCCESS)
         return ret;
 
diff --git a/modules/video_output/opengl/vout_helper.h b/modules/video_output/opengl/vout_helper.h
index 03f4f68415..482eabb554 100644
--- a/modules/video_output/opengl/vout_helper.h
+++ b/modules/video_output/opengl/vout_helper.h
@@ -103,7 +103,6 @@ void vout_display_opengl_Viewport(vout_display_opengl_t *vgl, int x, int y,
 
 int vout_display_opengl_Prepare(vout_display_opengl_t *vgl,
                                 picture_t *picture, subpicture_t *subpicture);
-int vout_display_opengl_Display(vout_display_opengl_t *vgl,
-                                const video_format_t *source);
+int vout_display_opengl_Display(vout_display_opengl_t *vgl);
 
 #endif
diff --git a/modules/video_output/win32/glwin32.c b/modules/video_output/win32/glwin32.c
index 34c922b4a5..e5b908a455 100644
--- a/modules/video_output/win32/glwin32.c
+++ b/modules/video_output/win32/glwin32.c
@@ -224,7 +224,7 @@ static void Display(vout_display_t *vd, picture_t *picture)
 
     if (vlc_gl_MakeCurrent (sys->gl) == VLC_SUCCESS)
     {
-        vout_display_opengl_Display (sys->vgl, &vd->source);
+        vout_display_opengl_Display(sys->vgl);
         vlc_gl_ReleaseCurrent (sys->gl);
     }
 }
-- 
2.25.0



More information about the vlc-devel mailing list