summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasiliy Ulyanov <v.ulyanov@samsung.com>2016-09-13 19:10:37 +0300
committerVasiliy Ulyanov <v.ulyanov@samsung.com>2016-09-13 19:10:37 +0300
commitff9555ba17932b7f24f6eae8fa412640c7702167 (patch)
tree9c4b35df9dcc164d100c47102f1bed5840aa7df2
parent2d72dfd07e19b9cb9f6d56036342f4c79c2fce35 (diff)
downloademulator-yagl-ff9555ba17932b7f24f6eae8fa412640c7702167.tar.gz
emulator-yagl-ff9555ba17932b7f24f6eae8fa412640c7702167.tar.bz2
emulator-yagl-ff9555ba17932b7f24f6eae8fa412640c7702167.zip
Ensure drm gem is always 'named'
When creating EGL image from tizen surface, the underlying gem may have no name assigned. This ends up with client handle set to zero. The commit fixes such an issue. Change-Id: Ica907a251d9a64a8661232e2718930caa052e0a3 Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
-rw-r--r--EGL/yagl_onscreen_image_tizen_sfc.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/EGL/yagl_onscreen_image_tizen_sfc.c b/EGL/yagl_onscreen_image_tizen_sfc.c
index 44fdf4d..925d14e 100644
--- a/EGL/yagl_onscreen_image_tizen_sfc.c
+++ b/EGL/yagl_onscreen_image_tizen_sfc.c
@@ -214,14 +214,6 @@ struct yagl_onscreen_image_tizen_sfc
goto fail;
}
- ret = vigs_drm_gem_get_name(&drm_sfc->gem);
-
- if (ret) {
- YAGL_LOG_ERROR("vigs_drm_gem_get_name failed: %s", strerror(-ret));
- yagl_set_error(EGL_BAD_ALLOC);
- goto fail;
- }
-
ret = vigs_drm_gem_map(&drm_sfc->gem, 1);
if (ret) {
@@ -248,6 +240,14 @@ struct yagl_onscreen_image_tizen_sfc
vigs_drm_gem_ref(&drm_sfc->gem);
}
+ ret = vigs_drm_gem_get_name(&drm_sfc->gem);
+
+ if (ret) {
+ YAGL_LOG_ERROR("vigs_drm_gem_get_name failed: %s", strerror(-ret));
+ yagl_set_error(EGL_BAD_ALLOC);
+ goto fail;
+ }
+
if (!yagl_host_eglCreateImageYAGL(tex_global_name,
dpy->host_dpy,
drm_sfc->id,