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

Romain Vimont rom1v at videolabs.io
Tue Mar 17 17:26:49 CET 2020


The video_format_t parameter of vout_display_opengl_Display() is not
used anymore. Remove it.
---
 modules/video_output/caopengllayer.m      | 2 +-
 modules/video_output/ios.m                | 2 +-
 modules/video_output/macosx.m             | 4 ++--
 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 +-
 9 files changed, 11 insertions(+), 16 deletions(-)

diff --git a/modules/video_output/caopengllayer.m b/modules/video_output/caopengllayer.m
index afe6d6a3f7..10fccdf90d 100644
--- a/modules/video_output/caopengllayer.m
+++ b/modules/video_output/caopengllayer.m
@@ -469,7 +469,7 @@ static void *OurGetProcAddress (vlc_gl_t *gl, const char *name)
                                  sys->place.width, sys->place.height);
 
     // flush is also done by this method, no need to call super
-    vout_display_opengl_Display (sys->vgl, &_voutDisplay->source);
+    vout_display_opengl_Display(sys->vgl);
     sys->b_frame_available = NO;
 }
 
diff --git a/modules/video_output/ios.m b/modules/video_output/ios.m
index ad11b6a705..3bcf084d5c 100644
--- a/modules/video_output/ios.m
+++ b/modules/video_output/ios.m
@@ -291,7 +291,7 @@ static void PictureDisplay(vout_display_t *vd, picture_t *pic)
 
     if (vlc_gl_MakeCurrent(sys->gl) == VLC_SUCCESS)
     {
-        vout_display_opengl_Display(glsys->vgl, &vd->source);
+        vout_display_opengl_Display(glsys->vgl);
         vlc_gl_ReleaseCurrent(sys->gl);
     }
 }
diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m
index 33a5e26e79..5e0a10af6f 100644
--- a/modules/video_output/macosx.m
+++ b/modules/video_output/macosx.m
@@ -327,7 +327,7 @@ static void PictureDisplay (vout_display_t *vd, picture_t *pic)
                                          place.width, place.height);
         }
 
-        vout_display_opengl_Display (sys->vgl, &vd->source);
+        vout_display_opengl_Display(sys->vgl);
         vlc_gl_ReleaseCurrent(sys->gl);
     }
     [sys->glView setVoutFlushing:NO];
@@ -605,7 +605,7 @@ static void OpenglSwap (vlc_gl_t *gl)
 
     if (hasFirstFrame)
         // This will lock gl.
-        vout_display_opengl_Display (vd->sys->vgl, &vd->source);
+        vout_display_opengl_Display(vd->sys->vgl);
     else
         glClear (GL_COLOR_BUFFER_BIT);
 }
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 ae955109b5..abd2e6347b 100644
--- a/modules/video_output/opengl/vout_helper.c
+++ b/modules/video_output/opengl/vout_helper.c
@@ -221,8 +221,7 @@ int vout_display_opengl_Prepare(vout_display_opengl_t *vgl,
     GL_ASSERT_NOERROR(&vgl->api.vt);
     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(&vgl->api.vt);
 
@@ -230,7 +229,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 df35eed7da..da893768c4 100644
--- a/modules/video_output/win32/glwin32.c
+++ b/modules/video_output/win32/glwin32.c
@@ -225,7 +225,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.1



More information about the vlc-devel mailing list