[vlc-commits] glwin32: inline the Manage call
Steve Lhomme
git at videolan.org
Mon Apr 1 16:50:14 CEST 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Mar 25 14:12:44 2019 +0100| [cd86df9fc4e626298c8ee7ac031a72cdb60c1d73] | committer: Steve Lhomme
glwin32: inline the Manage call
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cd86df9fc4e626298c8ee7ac031a72cdb60c1d73
---
modules/video_output/win32/glwin32.c | 34 +++++++++++-----------------------
1 file changed, 11 insertions(+), 23 deletions(-)
diff --git a/modules/video_output/win32/glwin32.c b/modules/video_output/win32/glwin32.c
index 6bc321e717..80b6ec1e45 100644
--- a/modules/video_output/win32/glwin32.c
+++ b/modules/video_output/win32/glwin32.c
@@ -73,7 +73,6 @@ struct vout_display_sys_t
static picture_pool_t *Pool (vout_display_t *, unsigned);
static void Prepare(vout_display_t *, picture_t *, subpicture_t *, vlc_tick_t);
static void Display(vout_display_t *, picture_t *);
-static void Manage (vout_display_t *);
static int Control(vout_display_t *vd, int query, va_list args)
{
@@ -218,15 +217,20 @@ static picture_pool_t *Pool(vout_display_t *vd, unsigned count)
static void Prepare(vout_display_t *vd, picture_t *picture, subpicture_t *subpicture,
vlc_tick_t date)
{
- Manage(vd);
VLC_UNUSED(date);
vout_display_sys_t *sys = vd->sys;
- if (vlc_gl_MakeCurrent (sys->gl) == VLC_SUCCESS)
- {
- vout_display_opengl_Prepare (sys->vgl, picture, subpicture);
- vlc_gl_ReleaseCurrent (sys->gl);
- }
+ CommonManage(vd, &sys->sys);
+
+ const int width = sys->sys.place.width;
+ const int height = sys->sys.place.height;
+ vlc_gl_Resize (sys->gl, width, height);
+ if (vlc_gl_MakeCurrent (sys->gl) != VLC_SUCCESS)
+ return;
+ vout_display_opengl_SetWindowAspectRatio(sys->vgl, (float)width / height);
+ vout_display_opengl_Viewport(sys->vgl, 0, 0, width, height);
+ vout_display_opengl_Prepare (sys->vgl, picture, subpicture);
+ vlc_gl_ReleaseCurrent (sys->gl);
}
static void Display(vout_display_t *vd, picture_t *picture)
@@ -240,19 +244,3 @@ static void Display(vout_display_t *vd, picture_t *picture)
vlc_gl_ReleaseCurrent (sys->gl);
}
}
-
-static void Manage (vout_display_t *vd)
-{
- vout_display_sys_t *sys = vd->sys;
-
- CommonManage(vd, &sys->sys);
-
- const int width = sys->sys.place.width;
- const int height = sys->sys.place.height;
- vlc_gl_Resize (sys->gl, width, height);
- if (vlc_gl_MakeCurrent (sys->gl) != VLC_SUCCESS)
- return;
- vout_display_opengl_SetWindowAspectRatio(sys->vgl, (float)width / height);
- vout_display_opengl_Viewport(sys->vgl, 0, 0, width, height);
- vlc_gl_ReleaseCurrent (sys->gl);
-}
More information about the vlc-commits
mailing list