Copy the Cairo multithreading animation sample but use a cairo_gl_surface instead.