[cairo] Survey of polygon rasterization techniques
zack at kde.org
Wed Aug 1 00:32:41 PDT 2007
On Wednesday 01 August 2007 02:51:21 am Kiia Kallio wrote:
> - I create all polygons as polygon objects (or whatever concept the
> underlying library uses) first and render with those (instead of feeding
> my polygon coordinates to the API over and over again in every frame).
> This way I'm really measuring the rendering performance, not just
> API overhead (like the Zack Rusin's QT tests do...)
My tests weren't testing rasterization performance so saying "my tests were a
lot better at testing rasterization performance than tests that weren't
testing rasterization performance" isn't the killer argument it could have
On a sidenote, there's a very good reason why I was feeding the coordinates -
if you feed data in the native structure used to hold geometrical data, then
a lot of geometrical properties can be cached (e.g. whether a polygon
intersects is not going to change under scale/translation/rotation, so
suddenly under those cases even tessellation becomes a O(n) process) and I
was not interested in smartness of caching but raw rendering speed as seen
from the top.
As to the other points I agree with David.
The problem with algorithms for graphics /frameworks/ is that benchmarking is
difficult because no test can really accommodate the variety of uses from the
client side. The algorithm has to be generic enough to handle all the cases.
Then there's the question of how the algorithm fits within the current
pipeline, i.e. what is the raw setup time necessary to move from the
framework's public api to its internal representation.
It is only in this broad spectrum that we can judge its performance, which
tends to be difficult unless one has actually integrated the algorithm in.
I certainly think your algorithm is extremely interesting (plus I love that
you actually provided benchmarking code for it, which is something that you
rarely see for research papers) and well worth the time needed to integrate
it and test how it performs in the global scope of the framework.
But when it comes to the final outcome, years of experience in implementing
research papers for graphics frameworks taught me to remain skeptic until the
More information about the cairo