summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2016-05-20 15:23:19 -0500
committerDerek Foreman <derekf@osg.samsung.com>2016-05-20 15:47:21 -0500
commitf8976aed13432f13c7c7c871eac027c177814345 (patch)
treea09d3bebd1a71128ea9992cc24f3b51345498144
parentba063275275f586ea8ec336c036142acfdd77826 (diff)
gl_drm: Fix silly run time warning for wayland dmabuf
DMABuf buffers destroy their glimage in the unbind callback, so it's usually already gone for the free callback. Now we test if we actually need to destroy anything. Also, switch to GLERRV macro for error reporting - it saves us the heavy eglGetError() unless we've built it in intentionally.
-rw-r--r--src/modules/evas/engines/gl_drm/evas_engine.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/modules/evas/engines/gl_drm/evas_engine.c b/src/modules/evas/engines/gl_drm/evas_engine.c
index 34c0d9eecd..5fcfc897c6 100644
--- a/src/modules/evas/engines/gl_drm/evas_engine.c
+++ b/src/modules/evas/engines/gl_drm/evas_engine.c
@@ -750,14 +750,11 @@ _native_cb_free(void *image)
750 eina_hash_del(img->native.shared->native_wl_hash, &wlid, img); 750 eina_hash_del(img->native.shared->native_wl_hash, &wlid, img);
751 if (n->ns_data.wl_surface.surface) 751 if (n->ns_data.wl_surface.surface)
752 { 752 {
753 if (glsym_eglDestroyImage) 753 if (glsym_eglDestroyImage && n->ns_data.wl_surface_dmabuf.image)
754 { 754 {
755 glsym_eglDestroyImage(img->native.disp, n->ns_data.wl_surface_dmabuf.image); 755 glsym_eglDestroyImage(img->native.disp, n->ns_data.wl_surface_dmabuf.image);
756 if (eglGetError() != EGL_SUCCESS) 756 GLERRV("eglDestroyImage() failed.");
757 ERR("eglDestroyImage() failed.");
758 } 757 }
759 else
760 ERR("Try eglDestroyImage on EGL with no support");
761 } 758 }
762 } 759 }
763 else if (n->ns.type == EVAS_NATIVE_SURFACE_WL) 760 else if (n->ns.type == EVAS_NATIVE_SURFACE_WL)