evas-gl-drm: Find symlink for eglSetDamageRegionKHR
authorChris Michael <cp.michael@samsung.com>
Wed, 4 Nov 2015 16:18:25 +0000 (11:18 -0500)
committerChris Michael <cp.michael@samsung.com>
Wed, 4 Nov 2015 16:18:25 +0000 (11:18 -0500)
In efforts to reduce tearing in the gl_drm engine, find and link to
the eglSetDamageRegionKHR function so we can mark damaged regions of a
surface

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
src/modules/evas/engines/gl_drm/evas_engine.c
src/modules/evas/engines/gl_drm/evas_engine.h

index bfa9d58..145c5df 100644 (file)
@@ -77,9 +77,10 @@ glsym_func_void_ptr glsym_evas_gl_common_current_context_get = NULL;
 _eng_fn (*glsym_eglGetProcAddress)(const char *a) = NULL;
 void *(*glsym_eglCreateImage)(EGLDisplay a, EGLContext b, EGLenum c, EGLClientBuffer d, const int *e) = NULL;
 void (*glsym_eglDestroyImage)(EGLDisplay a, void *b) = NULL;
-void (*glsym_glEGLImageTargetTexture2DOES)(int a, void *b)  = NULL;
+void (*glsym_glEGLImageTargetTexture2DOES)(int a, void *b) = NULL;
 unsigned int (*glsym_eglSwapBuffersWithDamage)(EGLDisplay a, void *b, const EGLint *d, EGLint c) = NULL;
 unsigned int (*glsym_eglQueryWaylandBufferWL)(EGLDisplay a, struct wl_resource *b, EGLint c, EGLint *d) = NULL;
+unsigned int (*glsym_eglSetDamageRegionKHR)(EGLDisplay a, EGLSurface b, EGLint *c, EGLint d) = NULL;
 
 /* local function prototypes */
 static void gl_symbols(void);
@@ -229,6 +230,9 @@ gl_symbols(void)
    FINDSYM(glsym_eglSwapBuffersWithDamage, "eglSwapBuffersWithDamage",
            glsym_func_uint);
 
+   FINDSYM(glsym_eglSetDamageRegionKHR, "eglSetDamageRegionKHR",
+           glsym_func_uint);
+
    FINDSYM(glsym_eglQueryWaylandBufferWL, "eglQueryWaylandBufferWL",
            glsym_func_uint);
 
@@ -253,8 +257,17 @@ gl_extn_veto(Render_Engine *re)
           {
              _extn_have_buffer_age = 0;
              glsym_eglSwapBuffersWithDamage = NULL;
+             glsym_eglSetDamageRegionKHR = NULL;
+          }
+        if (!strstr(str, "EGL_EXT_buffer_age"))
+          {
+             if (!strstr(str, "EGL_KHR_partial_update"))
+               _extn_have_buffer_age = 0;
           }
-        if (!strstr(str, "EGL_EXT_buffer_age")) _extn_have_buffer_age = 0;
+
+        if (!strstr(str, "EGL_KHR_partial_update"))
+          glsym_eglSetDamageRegionKHR = NULL;
+
         if (!strstr(str, "EGL_EXT_swap_buffers_with_damage"))
           glsym_eglSwapBuffersWithDamage = NULL;
      }
index 740c305..1ef0e7c 100644 (file)
@@ -142,5 +142,6 @@ _re_wincheck(Outbuf *ob)
 }
 
 extern unsigned int (*glsym_eglSwapBuffersWithDamage)(EGLDisplay a, void *b, const EGLint *d, EGLint c);
+extern unsigned int (*glsym_eglSetDamageRegionKHR)(EGLDisplay a, EGLSurface b, EGLint *c, EGLint d);
 
 #endif