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.
This commit is contained in:
Robert Bragg 2008-12-18 17:54:35 +00:00
parent 9cd92fc540
commit 5e0daa8ecd

View File

@ -696,6 +696,13 @@ clutter_glx_texture_pixmap_create_glx_pixmap (ClutterGLXTexturePixmap *texture)
attribs[i++] = None; 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 (); clutter_x11_trap_x_errors ();
glx_pixmap = glXCreatePixmap (dpy, glx_pixmap = glXCreatePixmap (dpy,
*fbconfig, *fbconfig,