evas/wayland_egl: Don't create EGLSurface for internal gl resource if we already have one in re->win.

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.

SVN revision: 79505
This commit is contained in:
Christopher Michael 2012-11-21 10:02:18 +00:00
parent a89d61079c
commit 190e65dac3
1 changed files with 11 additions and 3 deletions

View File

@ -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.");