From 54504b7ac46c92d996a08fa3957b702aea70af68 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 17 Mar 2010 17:41:52 +0000 Subject: [PATCH] glx: Remove unnecessary call to create_stage() If we are in the stage realization sequence we already have a GLX context set in the backend; there is no need to call create_backend(). --- clutter/glx/clutter-stage-glx.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/clutter/glx/clutter-stage-glx.c b/clutter/glx/clutter-stage-glx.c index e23c77038..a6218f5ff 100644 --- a/clutter/glx/clutter-stage-glx.c +++ b/clutter/glx/clutter-stage-glx.c @@ -127,12 +127,11 @@ clutter_stage_glx_unrealize (ClutterStageWindow *stage_window) static gboolean clutter_stage_glx_realize (ClutterStageWindow *stage_window) { - ClutterStageX11 *stage_x11 = CLUTTER_STAGE_X11 (stage_window); - ClutterStageGLX *stage_glx = CLUTTER_STAGE_GLX (stage_window); - ClutterBackend *backend; - ClutterBackendGLX *backend_glx; + ClutterStageX11 *stage_x11 = CLUTTER_STAGE_X11 (stage_window); + ClutterStageGLX *stage_glx = CLUTTER_STAGE_GLX (stage_window); ClutterBackendX11 *backend_x11; - GError *error; + ClutterBackendGLX *backend_glx; + ClutterBackend *backend; CLUTTER_NOTE (ACTOR, "Realizing stage '%s' [%p]", G_OBJECT_TYPE_NAME (stage_window), @@ -263,16 +262,6 @@ clutter_stage_glx_realize (ClutterStageWindow *stage_window) stage_x11->xwin_height); clutter_stage_x11_set_wm_protocols (stage_x11); - /* ask for a context; a no-op, if a context already exists */ - error = NULL; - _clutter_backend_create_context (backend, &error); - if (error) - { - g_critical ("Unable to realize stage: %s", error->message); - g_error_free (error); - return FALSE; - } - CLUTTER_NOTE (BACKEND, "Successfully realized stage"); /* chain up to the StageX11 implementation */