]> git.sesse.net Git - vlc/commitdiff
opengl: remove lock/unlock callbacks
authorRémi Denis-Courmont <remi@remlab.net>
Mon, 3 Nov 2014 17:13:56 +0000 (19:13 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Mon, 3 Nov 2014 17:14:32 +0000 (19:14 +0200)
They are superseded by makeCurrent() and releaseCurrent().

include/vlc_opengl.h
modules/video_output/egl.c
modules/video_output/glx.c
modules/video_output/msw/glwin32.c

index 2a6db1bca9ac0b30a15948d6f06cbc35f31236e4..131ecd143f5db95ec7b6c1d214fe611099665159 100644 (file)
@@ -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)
index adbc94ead9aead0f2a4b9ced13d51ce1944c375b..1f2d5b12283ef0b3724235614a038fd0dbd1b638 100644 (file)
@@ -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:
index 32e12b9a223fd7e1630b1f8dfe3e076e6ae0ccd1..dc692e9a59c397b44523d8adf4195b7cd481de3f 100644 (file)
@@ -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;
index 89f2d7d41d4383573ad85c10a038a96ba01bf398..3969c8fa760d82e0af994c8c515bbdd208017247 100644 (file)
@@ -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;