From 40b43fd64a7d5563d6b8b736c0ede625311934c2 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Wed, 3 Mar 2010 18:08:33 +0000 Subject: [PATCH] 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 --- clutter/eglnative/clutter-backend-egl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/clutter/eglnative/clutter-backend-egl.c b/clutter/eglnative/clutter-backend-egl.c index 09eae2223..031f3a308 100644 --- a/clutter/eglnative/clutter-backend-egl.c +++ b/clutter/eglnative/clutter-backend-egl.c @@ -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,