[cairo] [PATCH 1/2] gl: Add a first bit of general documentation on cairo-gl usage.

Benjamin Otte otte at redhat.com
Wed Feb 2 16:19:12 PST 2011


On Tue, 2011-02-01 at 11:45 -0800, Eric Anholt wrote:
> I saw the massive performance hit from the moment you introduced the
> context unbinding -- I'm not sure what you'd have been benchmarking that
> didn't.  Perhaps one of the few tests that's GPU limited?  I've got some
> hacks to Mesa to slightly reduce the pain of unbind (which the
> benchmarking I reported was actually done against), but I really don't
> see anything to reduce it further than the couple of percent I've got
> right now.  One of the rules of making GL work reasonably is to not
> glFlush(), and the threading model you propose requires glFlush() on
> every exit of cairo.  As far as I can see, if we're going to require
> that, then we should abandon cairo-gl because it's not actually a
> performance improvement.
>
Well, the other option is to rethink cairo's threading guarantees and
say "cairo requires that every device is used in the same thread only"
or "threading guarantees depend on the backend". Which does not look
like a problem as it seems that
- nobody bothered fixing the image backend to make it threadsafe yet
- it looks like GStreamer will not go the cairo route
So it seems there is nobody wanting to use a cairo that allows using the
same surface in multiple threads at once. And everybody can bind
textures into multiple GL contexts manually, so it's still possible to
use cairo + GL + multithreading. It'll just be more work for the people
that want to do it.

We might want to delete the pthread-foo tests from our testsuite?

Benjamin,
who is partly disappointed and partly relieved about this.



More information about the cairo mailing list