[cairo] performance of cairo in a larger application
Keith Packard
keithp at keithp.com
Wed Jul 28 23:50:16 PDT 2004
Around 8 o'clock on Jul 29, Mathieu Lacage wrote:
> I wonder why you do not aim for higher-quality types of filters with
> tables of filter values indexed by the subpixel masks ?
The techniques which I found all break down in the presense of incremental
rendering -- you may get better values for a single figure, but adding
multiple figures together loses the 'sum-to-one' property so desirable in
our environment.
I may have missed a technique which avoided this problem, but we did read
a lot of papers on the subject...
> I must say I do not see why it is necessary to generate these simple
> trapezoids within cairo. Why not convert the fancy trapezoids to their
> simple "equivalent" just before accessing the hardware ?
Cairo draws a complete path with a single set of trapezoids. Because of
this, the movement of the trapezoid vertices is 'global'; adjustments
within one trapezoid are automatically compensated by motions of all
trapezoids sharing the same edge. Attempting to do this within the X
server causes some trapezoids to no longer precisely share edges with
their neighbors.
Only a global solution can make sure the figure has no gaps. This isn't
particularily important when anti-aliasing figures as the minor alpha
errors would be invisible on the screen, but when anti-aliasing is
disabled, the gaps show as obviously incorrect pixels.
In addition, it's more than possible that rounding of the trapezoid
endpoints would lead to accidental intersection of the trapezoid faces
which produces obviously wrong results.
Oh, I didn't *remove* the fancy trapezoids from Render; the point sampling
alpha computation generalizes quite nicely and it's still more than
possible that someone else will want to have the more general case
available on the client side. But, cairo will use only the simple
trapezoids as soon as the new tesselation code is written. Fallbacks to
the existing trapezoid encoding are trivial.
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20040728/7263a62a/attachment.pgp
More information about the cairo
mailing list