raster pushed a commit to branch efl-1.18. http://git.enlightenment.org/core/efl.git/commit/?id=99a1075bd1490ac9c3aa71bf582a62bb2ac58a66
commit 99a1075bd1490ac9c3aa71bf582a62bb2ac58a66 Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com> Date: Tue Aug 16 15:19:21 2016 +0900 evas gl x11 engine - fix buffer age symbol find and use it serems some changes broke our buffer age querying - we were using the wrong symbol... the EXT or ARGB onenot the core one which does work. use that first. then we get buffer age. @fix --- src/modules/evas/engines/gl_x11/evas_engine.c | 8 ++++---- src/modules/evas/engines/gl_x11/evas_engine.h | 2 +- src/modules/evas/engines/gl_x11/evas_x_main.c | 7 +++++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/modules/evas/engines/gl_x11/evas_engine.c b/src/modules/evas/engines/gl_x11/evas_engine.c index ddf1be6..f920aac 100644 --- a/src/modules/evas/engines/gl_x11/evas_engine.c +++ b/src/modules/evas/engines/gl_x11/evas_engine.c @@ -98,7 +98,7 @@ int (*glsym_glXGetVideoSync) (unsigned int *a) = NULL; int (*glsym_glXWaitVideoSync) (int a, int b, unsigned int *c) = NULL; XID (*glsym_glXCreatePixmap) (Display *a, void *b, Pixmap c, const int *d) = NULL; void (*glsym_glXDestroyPixmap) (Display *a, XID b) = NULL; -void (*glsym_glXQueryDrawable) (Display *a, XID b, int c, unsigned int *d) = NULL; +int (*glsym_glXQueryDrawable) (Display *a, XID b, int c, unsigned int *d) = NULL; int (*glsym_glXSwapIntervalSGI) (int a) = NULL; void (*glsym_glXSwapIntervalEXT) (Display *s, GLXDrawable b, int c) = NULL; void (*glsym_glXReleaseBuffersMESA) (Display *a, XID b) = NULL; @@ -1406,9 +1406,9 @@ eng_gl_symbols(Eina_Bool noext_glXCreatePixmap) FINDSYM(glsym_glXDestroyPixmap, "glXDestroyPixmapARB", glsym_func_void); FINDSYM(glsym_glXDestroyPixmap, "glXDestroyPixmap", glsym_func_void); - FINDSYM(glsym_glXQueryDrawable, "glXQueryDrawableEXT", glsym_func_void); - FINDSYM(glsym_glXQueryDrawable, "glXQueryDrawableARB", glsym_func_void); - FINDSYM(glsym_glXQueryDrawable, "glXQueryDrawable", glsym_func_void); + FINDSYM(glsym_glXQueryDrawable, "glXQueryDrawable", glsym_func_int); + FINDSYM(glsym_glXQueryDrawable, "glXQueryDrawableEXT", glsym_func_int); + FINDSYM(glsym_glXQueryDrawable, "glXQueryDrawableARB", glsym_func_int); FINDSYM(glsym_glXSwapIntervalSGI, "glXSwapIntervalMESA", glsym_func_int); FINDSYM(glsym_glXSwapIntervalSGI, "glXSwapIntervalSGI", glsym_func_int); diff --git a/src/modules/evas/engines/gl_x11/evas_engine.h b/src/modules/evas/engines/gl_x11/evas_engine.h index 5ecdd59..e480f23 100644 --- a/src/modules/evas/engines/gl_x11/evas_engine.h +++ b/src/modules/evas/engines/gl_x11/evas_engine.h @@ -157,7 +157,7 @@ extern unsigned int (*glsym_eglSetDamageRegionKHR) (EGLDisplay a, EGLSurface # define GLX_BACK_BUFFER_AGE_EXT 0x20f4 #endif -extern void (*glsym_glXQueryDrawable) (Display *a, XID b, int c, unsigned int *d); +extern int (*glsym_glXQueryDrawable) (Display *a, XID b, int c, unsigned int *d); extern void (*glsym_glXSwapIntervalEXT) (Display *s, GLXDrawable b, int c); extern int (*glsym_glXSwapIntervalSGI) (int a); extern int (*glsym_glXGetVideoSync) (unsigned int *a); diff --git a/src/modules/evas/engines/gl_x11/evas_x_main.c b/src/modules/evas/engines/gl_x11/evas_x_main.c index 98dfcc8..85f991d 100644 --- a/src/modules/evas/engines/gl_x11/evas_x_main.c +++ b/src/modules/evas/engines/gl_x11/evas_x_main.c @@ -1398,8 +1398,11 @@ eng_outbuf_swap_mode(Outbuf *ob) unsigned int age = 0; if (glsym_glXQueryDrawable) - glsym_glXQueryDrawable(ob->disp, ob->glxwin, - GLX_BACK_BUFFER_AGE_EXT, &age); + { + if (glsym_glXQueryDrawable(ob->disp, ob->glxwin, + GLX_BACK_BUFFER_AGE_EXT, &age) < 1) + age = 0; + } #endif if (age == 1) swap_mode = MODE_COPY; else if (age == 2) swap_mode = MODE_DOUBLE; --