title: XCreateGC function performance
body: <p>I've a problem with XCreateGC function performance. It seems that works normal(fast) in several cases, and very slow in other cases:). For more details, please look on this code:</p>
  
  <pre><code>void some_function(int dx, int dy, int sx, int sy, int w, int h,
                  Drawable src, Drawable mask, Drawable dest)
  {
          Display *dpy = QX11Info::display();
          GC gc = XCreateGC(dpy, src, 0, 0);
          XSetClipOrigin(dpy, gc, dx - sx, dy - sy);
          XSetClipMask(dpy, gc, mask);
          XCopyArea(dpy, src, dest, gc, sx, sy, w, h, dx, dy);
          XFreeGC(dpy, gc);
  }
  </code></pre>
  
  <p>Thanks in advance.</p>