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)
downloadefl-f8976aed13432f13c7c7c871eac027c177814345.tar.gz
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)
eina_hash_del(img->native.shared->native_wl_hash, &wlid, img);
if (n->ns_data.wl_surface.surface)
{
- if (glsym_eglDestroyImage)
+ if (glsym_eglDestroyImage && n->ns_data.wl_surface_dmabuf.image)
{
glsym_eglDestroyImage(img->native.disp, n->ns_data.wl_surface_dmabuf.image);
- if (eglGetError() != EGL_SUCCESS)
- ERR("eglDestroyImage() failed.");
+ GLERRV("eglDestroyImage() failed.");
}
- else
- ERR("Try eglDestroyImage on EGL with no support");
}
}
else if (n->ns.type == EVAS_NATIVE_SURFACE_WL)