Render on a temporary surface when needed

Some platforms draw directly to the screen, which means that updates
will flicker if we draw multiple layers. Prevent this by first
composing the update on a hidden surface.
diff --git a/vncviewer/Surface_X11.cxx b/vncviewer/Surface_X11.cxx
index c7e3778..e761614 100644
--- a/vncviewer/Surface_X11.cxx
+++ b/vncviewer/Surface_X11.cxx
@@ -48,6 +48,12 @@
   XRenderFreePicture(fl_display, winPict);
 }
 
+void Surface::draw(Surface* dst, int src_x, int src_y, int x, int y, int w, int h)
+{
+  XRenderComposite(fl_display, PictOpSrc, picture, None, dst->picture,
+                   src_x, src_y, 0, 0, x, y, w, h);
+}
+
 void Surface::alloc()
 {
   XRenderPictFormat* format;