From: Alex Wu <zhiwen...@linux.intel.com>

EGL 1.4 spec Section 3.5.1: If there is already an
EGLSurface associated with win (as a result of a previous
eglCreateWindowSurface call), then an EGL_BAD_ALLOC error is
generated.

So that this eglCreateWindowSurface() will fail if the egl driver is
a strict conformance to the spec.
---
 .../modules/evas/engines/wayland_egl/evas_engine.c |   14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/trunk/efl/src/modules/evas/engines/wayland_egl/evas_engine.c 
b/trunk/efl/src/modules/evas/engines/wayland_egl/evas_engine.c
index fee38a1..df95606 100644
--- a/trunk/efl/src/modules/evas/engines/wayland_egl/evas_engine.c
+++ b/trunk/efl/src/modules/evas/engines/wayland_egl/evas_engine.c
@@ -576,9 +576,17 @@ _create_internal_glue_resources(void *data)
    context_attrs[2] = EGL_NONE;
 
    // Create resource surface for EGL
-   rsc->surface = 
-     eglCreateWindowSurface(re->win->egl_disp, re->win->egl_config,
-                            (EGLNativeWindowType)re->win->win, NULL);
+   if (re->win->egl_surface[0])
+     {
+        rsc->surface = re->win->egl_surface[0];
+     } 
+   else 
+     {
+        rsc->surface = 
+          eglCreateWindowSurface(re->win->egl_disp, re->win->egl_config,
+                                (EGLNativeWindowType)re->win->win, NULL);
+     }
+
    if (!rsc->surface)
      {
         ERR("Creating internal resource surface failed.");
-- 
1.7.9.5


------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to