GTK+ performance without RENDER

Federico, cworth and I came up with a patch to Cairo that greatly improves the performance of GTK+ applications on X servers without the RENDER extension.

In this case the profiler didn’t really help much, it just showed that all of the time was spent in the X server. The real progress was made when Federico just made a guess on IRC, asking about how gdk_window_clear_backing_rect() goes through to cairo, and how the RENDER fallback code worked.

I think we were very lucky here. It’s hard to know whether it’s worth investigating performance on X servers without RENDER. While some people care a lot about these configurations, it is tempting to just let them deal with it. That’s the “open source” way, right? However, I found it disappointing to see how easy Federico’s steps were to recreate the problem, how obviously broken it was, and how simple the fix seems to be.