eglnative: Don't create a context if there already is one

If the EGL context is already created then we shouldn't try to create
another one. This was causing problems where one context would be
created from calling _clutter_feature_init and the other was created
from _clutter_backend_get_features. Cogl would set up its state using
the first context and then assume the state was still valid when the
second context became used so blending was not working correctly.

http://bugzilla.openedhand.com/show_bug.cgi?id=2020
This commit is contained in:
Neil Roberts 2010-03-03 18:08:33 +00:00
parent 169ce1508b
commit 40b43fd64a

View File

@ -104,6 +104,9 @@ clutter_backend_egl_create_context (ClutterBackend *backend,
EGL_NONE
};
if (backend_egl->egl_context)
return TRUE;
status = eglGetConfigs (backend_egl->edpy,
configs,
2,