[vlc-commits] opengl: do not pass the picture_t to the renderer

Romain Vimont git at videolan.org
Thu Jun 4 11:04:45 CEST 2020


vlc | branch: master | Romain Vimont <rom1v at videolabs.io> | Thu Feb  6 12:39:35 2020 +0100| [6705f8b344be104c25d1cd2d76a1210badcb0b67] | committer: Alexandre Janniaux

opengl: do not pass the picture_t to the renderer

The renderer is expected to be independant of the input picture format.
Instead, update the sampler directly.

Signed-off-by: Alexandre Janniaux <ajanni at videolabs.io>

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

 modules/video_output/opengl/renderer.c    |  7 -------
 modules/video_output/opengl/renderer.h    | 12 ------------
 modules/video_output/opengl/vout_helper.c |  2 +-
 3 files changed, 1 insertion(+), 20 deletions(-)

diff --git a/modules/video_output/opengl/renderer.c b/modules/video_output/opengl/renderer.c
index 9caad6d20b..a8986cdd05 100644
--- a/modules/video_output/opengl/renderer.c
+++ b/modules/video_output/opengl/renderer.c
@@ -764,13 +764,6 @@ 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)
-{
-    struct vlc_gl_sampler *sampler = renderer->sampler;
-    return vlc_gl_sampler_Update(sampler, picture);
-}
-
 int
 vlc_gl_renderer_Draw(struct vlc_gl_renderer *renderer)
 {
diff --git a/modules/video_output/opengl/renderer.h b/modules/video_output/opengl/renderer.h
index d17e5299dd..6e3f34b9de 100644
--- a/modules/video_output/opengl/renderer.h
+++ b/modules/video_output/opengl/renderer.h
@@ -117,18 +117,6 @@ vlc_gl_renderer_New(vlc_gl_t *gl, const struct vlc_gl_api *api,
 void
 vlc_gl_renderer_Delete(struct vlc_gl_renderer *renderer);
 
-/**
- * Prepare the fragment shader
- *
- * Concretely, it allocates OpenGL textures if necessary and uploads the
- * picture.
- *
- * \param sr the renderer
- * \param subpicture the subpicture to render
- */
-int
-vlc_gl_renderer_Prepare(struct vlc_gl_renderer *renderer, picture_t *picture);
-
 /**
  * Draw the prepared picture
  *
diff --git a/modules/video_output/opengl/vout_helper.c b/modules/video_output/opengl/vout_helper.c
index e2bb9e0f45..3cf479ae66 100644
--- a/modules/video_output/opengl/vout_helper.c
+++ b/modules/video_output/opengl/vout_helper.c
@@ -261,7 +261,7 @@ int vout_display_opengl_Prepare(vout_display_opengl_t *vgl,
 {
     GL_ASSERT_NOERROR(&vgl->api.vt);
 
-    int ret = vlc_gl_renderer_Prepare(vgl->renderer, picture);
+    int ret = vlc_gl_sampler_Update(vgl->sampler, picture);
     if (ret != VLC_SUCCESS)
         return ret;
 



More information about the vlc-commits mailing list