cogl-x11: Trap glXDestroyPixmap()
cogl-x11: Trap glXDestroyPixmap()

There are ordering issues in the pixmap destruction with current and
past X11 server, Mesa and dri2. Under some circumstances, an X pixmap
might be destroyed with the GLX pixmap still referencing it, and thus
the X server will decide to destroy the GLX pixmap as well; then, when
Cogl tries to destroy the GLX pixmap, it gets BadDrawable errors.

Clutter 1.2 used to trap + sync all calls to glXDestroyPixmap(), but
then we assumed that the ordering issue had been solved. So, we're back
to square 1.

I left a Big Fat Comment™ right above the glXDestroyPixmap() call
referencing the bug and the reasoning behind the trap, so that we don't
go and remove it in the future without checking that the issue has been
in fact solved.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2324

Distrotech/clutter,collects/clutter,collects/clutter,Distrotech/clutter,djdeath/clutter-android,heysion/clutter-clone,ebassi/clutter,jigpu/clutter,jigpu/clutter,ebassi/clutter,heysion/clutter-clone,spatulasnout/clutter,ebassi/clutter,heysion/clutter-clone,GNOME/clutter,djdeath/clutter-android,nobled/clutter,jigpu/clutter,djdeath/clutter,collects/clutter,kerrickstaley/clutter-vala,djdeath/clutter-android,GNOME/clutter,djdeath/clutter,djdeath/clutter,dlespiau/clutter,spatulasnout/clutter,djdeath/clutter-android,ebassi/clutter,djdeath/clutter-multithreaded,collects/clutter,kerrickstaley/clutter-vala,djdeath/clutter-multithreaded,djdeath/clutter,djdeath/clutter,djdeath/clutter-multithreaded,spatulasnout/clutter,Distrotech/clutter,jigpu/clutter,ebassi/clutter,collects/clutter,djdeath/clutter-android,spatulasnout/clutter,Distrotech/clutter,kerrickstaley/clutter-vala,kerrickstaley/clutter-vala,GNOME/clutter,nobled/clutter,dlespiau/clutter,GNOME/clutter,spatulasnout/clutter,Distrotech/clutter,djdeath/clutter-multithreaded,Distrotech/clutter,GNOME/clutter,nobled/clutter,heysion/clutter-clone,jigpu/clutter,heysion/clutter-clone,dlespiau/clutter,jigpu/clutter,djdeath/clutter