[vlc-devel] [PATCH 39/41] opengl: do not pass the picture_t to the renderer
Romain Vimont
rom1v at videolabs.io
Fri Feb 7 17:42:25 CET 2020
The renderer is expected to be independant of the input picture format.
Instead, update the sampler directly.
---
modules/video_output/opengl/renderer.c | 7 -------
modules/video_output/opengl/vout_helper.c | 2 +-
2 files changed, 1 insertion(+), 8 deletions(-)
diff --git a/modules/video_output/opengl/renderer.c b/modules/video_output/opengl/renderer.c
index 8a9630f69b..9fa95d5031 100644
--- a/modules/video_output/opengl/renderer.c
+++ b/modules/video_output/opengl/renderer.c
@@ -767,13 +767,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/vout_helper.c b/modules/video_output/opengl/vout_helper.c
index bec73b20ed..f694442e0a 100644
--- a/modules/video_output/opengl/vout_helper.c
+++ b/modules/video_output/opengl/vout_helper.c
@@ -264,7 +264,7 @@ int vout_display_opengl_Prepare(vout_display_opengl_t *vgl,
{
GL_ASSERT_NOERROR();
- int ret = vlc_gl_renderer_Prepare(vgl->renderer, picture);
+ int ret = vlc_gl_sampler_Update(vgl->sampler, picture);
if (ret != VLC_SUCCESS)
return ret;
--
2.25.0
More information about the vlc-devel
mailing list