Evas GL: Create XPixmap for GLES 1 indirect rendering 35/47435/4
authorDaekwang Ryu <dkdk.ryu@samsung.com>
Tue, 3 Mar 2015 06:44:28 +0000 (15:44 +0900)
committerDaeKwang Ryu <dkdk.ryu@samsung.com>
Wed, 16 Sep 2015 12:03:56 +0000 (21:03 +0900)
Change-Id: I130cb12104ca3716243ca926372af4b67ee04d1c

src/modules/evas/engines/gl_common/evas_gl_core.c

index bbf43f39db4296225b1a767a306ccf1dee8d16ac..ad79887a77a356d92fd154b4cec97002e28824ef 100644 (file)
@@ -2400,17 +2400,29 @@ evgl_native_surface_get(EVGL_Surface *sfc, Evas_Native_Surface *ns)
         return 0;
      }
 
-   ns->type = EVAS_NATIVE_SURFACE_OPENGL;
-   ns->version = EVAS_NATIVE_SURFACE_VERSION;
-   ns->data.opengl.texture_id = sfc->color_buf;
-   ns->data.opengl.framebuffer_id = sfc->color_buf;
-   ns->data.opengl.x = 0;
-   ns->data.opengl.y = 0;
-   ns->data.opengl.w = sfc->w;
-   ns->data.opengl.h = sfc->h;
-
-   if (sfc->direct_fb_opt)
-      ns->data.opengl.framebuffer_id = 0;
+   if (!sfc->xpixmap || sfc->direct_fb_opt)
+     {
+        ns->type = EVAS_NATIVE_SURFACE_OPENGL;
+        ns->version = EVAS_NATIVE_SURFACE_VERSION;
+        ns->data.opengl.texture_id = sfc->color_buf;
+        ns->data.opengl.framebuffer_id = sfc->color_buf;
+        ns->data.opengl.internal_format = sfc->color_ifmt;
+        ns->data.opengl.format = sfc->color_fmt;
+        ns->data.opengl.x = 0;
+        ns->data.opengl.y = 0;
+        ns->data.opengl.w = sfc->w;
+        ns->data.opengl.h = sfc->h;
+
+        if (sfc->direct_fb_opt)
+          ns->data.opengl.framebuffer_id = 0;
+     }
+   else
+     {
+        ns->type = EVAS_NATIVE_SURFACE_X11;
+        ns->version = EVAS_NATIVE_SURFACE_VERSION;
+        ns->data.x11.pixmap = (unsigned long)(intptr_t)sfc->gles1_sfc_native;
+        ns->data.x11.visual = sfc->gles1_sfc_visual;
+     }
 
    return 1;
 }