[OpenJDK Rasterizer] Some questions
Roman Kennke
roman at kennke.org
Wed May 16 04:00:34 PDT 2007
Hi,
> How does your AA rasterizer plug in?
The ScanlineConverter class basically takes one Shape object (the actual
Shape to be rendered), another one (the clip), an AffineTransform and a
parameter which says how sub-pixel resolution to render. It also takes
an object of an interface type to which the actual rendering is then
delegated. Objects implementing this interface basically fill lines with
pixels according to the coverage values passed into them.
It doesn't create tiles of larger areas yet, but that shouldn't be a big
problem to add. This means more or less aggregating the data of multiple
lines. Also, I don't deal with the data in a pixel-by-pixel format, but
with ranges on a scanline. Basically I store the x location, length and
coverage value for any scanline segment with one coverage value.
I haven't tested performance on JDK yet, Classpath can't easily plugged
into hotspot as is. Rendering some shapes like glyphs with classpath,
cacaovm and the Escher backend showed a performance difference of around
16x slower for non-AA rendering and 4x slower for AA rendering. The
performance difference between hotspot and cacaovm is also around the
factor 4x (cacao beeing 4x slower than hotspot). But takes these numbers
with a large portion of salt, it's only been a very naive simplistic
benchmark.
If you think this could be feasible and I should try to wire it to
OpenJDK, let me know, and give me some pointers where to start.
/Roman
--
http://kennke.org/blog/
More information about the graphics-rasterizer-dev
mailing list