[cairo] Re: [Mesa3d-dev] OpenGL and Cairo

David Reveman c99drn at cs.umu.se
Wed Apr 21 00:23:47 PDT 2004


On Tue, 2004-04-20 at 12:57 -0700, Jon Smirl wrote:

> I'll cc this over to the Cairo list. This will probably be a topic of discussion
> at the xdev meeting next week. Any chance one of you OpenGL exports might come
> to Boston? I'm not enough good enough at OpenGL to identify all of the issues.
> 
> --- Allen Akin <akin at pobox.com> wrote:
> > My general concerns were that the semantics weren't a good match for
> > what graphics accelerators (particularly fully programmable ones) do.....
> complete text at bottom
> 
> This was my general conclusion too. I'm ok with creating a separate 2D API but
> I'm concerned about how well it maps back into OpenGL. From my minor contact
> with Cairo people I think they ignored OpenGL in the begining since OpenGL is
> missing text support. Looking at Longhorn, xserver/cairo on top of mesa-solo (or
> a closed source equivalent) is our only hope for competing. xrender isn't even
> close.

Glitz; the library used for cairo's OpenGL backend, is a xrender-like
interface on top of OpenGL. It provides a very similar API to xrender
and all operations are hardware accelerated. Compared to the current
xrender implementations, glitz performs very well.

I think xrender is good, we just need it fully hardware accelerated and
glitz proves that it's possible to do this using OpenGL. I don't know if
this acceleration is good enough compared to Longhorn. Is the current
performance of cairo's OpenGL backend enough? Results from comparing
performance of cairo's OpenGL backend and Longhorn/MacOSX would be very
interesting.

If we find xrender inadequate, we can always extend it with more
functionality design to perform well using OpenGL, right?  

> If there are known problems mapping Cairo to OpenGL please let me know and I'll
> make sure they get discussed. For example Cairo using a different model for
> drawing gradients or curves could really mess up OpenGL performance. SVG has
> this problem when mapping onto OpenGL.

A paper that discusses all these problems and the solutions that we've
chosen will be published at freenix/usenix'04 in Boston this summer.

I've designed cairo's current gradient drawing model so that it maps
very well to OpenGL. I think the benchmark results prove that. I just
hope it's flexible enough. At least it provides all the flexibility
needed for rendering SVGs.

- David

-- 
David Reveman <c99drn at cs.umu.se>





More information about the cairo mailing list