From 5e0daa8ecd651a629b8a52eda6ba2fe5b915190d Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Thu, 18 Dec 2008 17:54:35 +0000 Subject: [PATCH] Improves tfp performance on Nvidia Some drivers (e.g. Nvidia) get upset if you try to create multiple glx pixmaps for the same server side pixmap object, even though you might have unique client side names, we now avoid hitting this problem by destroying the current glx pixmap early within clutter_glx_texture_pixmap_create_glx_pixmap. --- clutter/glx/clutter-glx-texture-pixmap.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/clutter/glx/clutter-glx-texture-pixmap.c b/clutter/glx/clutter-glx-texture-pixmap.c index 4c5221cac..280f34216 100644 --- a/clutter/glx/clutter-glx-texture-pixmap.c +++ b/clutter/glx/clutter-glx-texture-pixmap.c @@ -696,6 +696,13 @@ clutter_glx_texture_pixmap_create_glx_pixmap (ClutterGLXTexturePixmap *texture) attribs[i++] = None; + /* Note: some drivers (e.g. Nvidia) get upset if you effectivly create a glx + * pixmap for the same server side object, even though you might have unique + * client side names, we currently avoid hitting this problem by destroying + * the current glx pixmap first */ + if (priv->glx_pixmap) + clutter_glx_texture_pixmap_free_glx_pixmap (texture); + clutter_x11_trap_x_errors (); glx_pixmap = glXCreatePixmap (dpy, *fbconfig,