title: Efficiency of Drawing GTK Pixbufs with Cairo
body: <p>So, I want to draw an image using PyCairo.  Efficiency is pretty important, but I am loading the images using PyGtk's gtk.gdk.Pixbuf.  My question is, is there a performance difference in rendering the Pixbuf through retrieving a Cairo context through gtk.gdk.CairoContext vs converting the Pixbuf into a cairo.ImageSurface object, and if so, how big a difference is it?  This is run in a separate drawing thread that is updated 30 times a second or so (though only when the image needs updating).  Note that the conversion would only be run once.</p>
  
  <pre><code>gdkcr = gtk.gdk.CairoContext(cr)
  
  gdkcr.set_source_pixbuf(img, 0, 0)
  gdkcr.paint()
  </code></pre>
  
  <p>vs</p>
  
  <pre><code>cr.set_source(imgSurface)
  cr.rectangle(0, 0, imgSurface.get_width(), imgSurface.get_height())
  cr.fill()
  </code></pre>