[vlc-commits] opengl: remove lock/unlock callbacks

Rémi Denis-Courmont git at videolan.org
Mon Nov 3 18:14:42 CET 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Nov  3 19:13:56 2014 +0200| [fef26a45cc024d433bfa9ad08c7fefbdb47b2974] | committer: Rémi Denis-Courmont

opengl: remove lock/unlock callbacks

They are superseded by makeCurrent() and releaseCurrent().

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

 include/vlc_opengl.h               |   10 ++++++++++
 modules/video_output/egl.c         |    2 --
 modules/video_output/glx.c         |    2 --
 modules/video_output/msw/glwin32.c |    2 --
 4 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/include/vlc_opengl.h b/include/vlc_opengl.h
index 2a6db1b..131ecd1 100644
--- a/include/vlc_opengl.h
+++ b/include/vlc_opengl.h
@@ -49,8 +49,10 @@ struct vlc_gl_t
     void (*releaseCurrent)(vlc_gl_t *);
     void (*resize)(vlc_gl_t *, unsigned, unsigned);
     void (*swap)(vlc_gl_t *);
+#ifdef __APPLE__
     int  (*lock)(vlc_gl_t *);
     void (*unlock)(vlc_gl_t *);
+#endif
     void*(*getProcAddress)(vlc_gl_t *, const char *);
 };
 
@@ -75,13 +77,21 @@ static inline void vlc_gl_ReleaseCurrent(vlc_gl_t *gl)
 
 static inline int vlc_gl_Lock(vlc_gl_t *gl)
 {
+#ifdef __APPLE__
     return (gl->lock != NULL) ? gl->lock(gl) : VLC_SUCCESS;
+#else
+    (void) gl; return VLC_SUCCESS;
+#endif
 }
 
 static inline void vlc_gl_Unlock(vlc_gl_t *gl)
 {
+#ifdef __APPLE__
     if (gl->unlock != NULL)
         gl->unlock(gl);
+#else
+    (void) gl;
+#endif
 }
 
 static inline void vlc_gl_Resize(vlc_gl_t *gl, unsigned w, unsigned h)
diff --git a/modules/video_output/egl.c b/modules/video_output/egl.c
index adbc94e..1f2d5b1 100644
--- a/modules/video_output/egl.c
+++ b/modules/video_output/egl.c
@@ -359,8 +359,6 @@ static int Open (vlc_object_t *obj, const struct gl_api *api)
     gl->resize = Resize;
     gl->swap = SwapBuffers;
     gl->getProcAddress = GetSymbol;
-    gl->lock = NULL;
-    gl->unlock = NULL;
     return VLC_SUCCESS;
 
 error:
diff --git a/modules/video_output/glx.c b/modules/video_output/glx.c
index 32e12b9..dc692e9 100644
--- a/modules/video_output/glx.c
+++ b/modules/video_output/glx.c
@@ -208,8 +208,6 @@ static int Open (vlc_object_t *obj)
     gl->resize = NULL;
     gl->swap = SwapBuffers;
     gl->getProcAddress = GetSymbol;
-    gl->lock = NULL;
-    gl->unlock = NULL;
 
 #ifdef GLX_ARB_get_proc_address
     bool is_swap_interval_set = false;
diff --git a/modules/video_output/msw/glwin32.c b/modules/video_output/msw/glwin32.c
index 89f2d7d..3969c8f 100644
--- a/modules/video_output/msw/glwin32.c
+++ b/modules/video_output/msw/glwin32.c
@@ -204,8 +204,6 @@ static int Open(vlc_object_t *object)
 #endif
 
     /* */
-    sys->gl.lock = NULL;
-    sys->gl.unlock = NULL;
     sys->gl.swap = Swap;
     sys->gl.getProcAddress = OurGetProcAddress;
     sys->gl.sys = vd;



More information about the vlc-commits mailing list