[cairo] Mozilla on Cairo

mental at rydia.net mental at rydia.net
Wed May 11 15:12:07 PDT 2005


Quoting Robert O'Callahan <rocallahan at novell.com>:

> For software-only renderers the efficiency might be comparable,
> but the full-scene trapezoid approach is less amenable to hardware
> acceleration, correct? (I mean using the hardware we actually
> have, as opposed to hardware that could theoretically be built.)

Not sure.  In either case the only part that you could really push
to the hardware would be the rasterization/painting (and rescaling,
if you're doing supersampling).  As far as I know cairo is not
designed to permit the acceleration of tesselation in hardware.

Assuming the client application builds up the image in a naive
painters' algorithm fashion, which approach is more efficient will
depend on the complexity of the image (in terms of overlapping) and
on the overall pixel area that needs to be painted.

Straight supersampling potentially wastes a lot of time pushing
pixels by painting opaquely over the same area several times due to
overlapping, and by supersampling areas that don't really require it
(e.g. large areas of flat color).  Adaptive supersampling would
help, but you'd likely need to set up a BSP or quadtree or
something to do that...

So I don't think there's a clear-cut performance win one way or the
other.

However, naive supersampling does have the advantage of being simple
and straightforward to implement, and seems to work well enough (it
is apparently what the Macromedia Flash plugin does).  I'd
originally just intended to point out that FSAA didn't necessarily
imply that specific supersampling technique.

-mental



More information about the cairo mailing list