[cairo] New OpenGL backend merged

Chris Wilson chris at chris-wilson.co.uk
Thu Jul 23 03:06:16 PDT 2009


On Thu, 2009-07-23 at 19:20 +1000, John C. Turnbull wrote:
> One thing I have noticed about OpenGL is that it seems to be difficult to
> achieve good antialiasing because this appears to be under the control of
> the graphics driver and therefore the end user can turn it on or off.  Does
> using an OpenGL back-end for Cairo mean that it will also suffer from this
> problem?  Or is there a way to force antialiasing on at all times when using
> OpenGL?

Indeed, the poor quality of antialiasing has been what has prevented
widespread adoption of GL as the acceleration architecture to date.

Hmm, there used to be a good comparison of text rendering using RENDER
and GL - I suspect it was by Owen Taylor, but I can't find it now.

The primary goal of every backend is to achieve identical results to the
image backend. [Cairo guarantees the nearly identical results across all
of its backends. For example we allow hardware to err by a graylevel or
so.] The primary goal of image is to produce the a good comprise between
the highest quality results[1] and speed of implementation, with the
trend towards increasing visual quality (for example the polygon
rasteriser computes coverage on a 255x17 sub-pixel grid). Any GL backend
must be able to match this, and currently does by performing the
tessellation on the CPU.

However, the application may like to choose its own tradeoff between
speed/quality [though I'd recommend that this should only be made at the
desktop/system level - you don't want text from two applications looking
different], we do have a parameter which allows the user to choose the
level of antialiasing to apply. At the moment, Cairo only dictates the
results for the default antialias and none -- we can use the other modes
for implementation specific tradeoffs between speed and quality.
-ickle

[1] Yes, some aspects of Cairo -- like image scaling -- are not as good
as they should be.



More information about the cairo mailing list