[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freetype-devel
Subject:    Re: [ft-devel] QRasterizer - a new rasterizer faster than freetype
From:       "David Turner" <david () freetype ! org>
Date:       2007-12-21 0:09:14
Message-ID: c3164bd10712201609r370e786au74c9596decb8cfbf () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


thanks Lars for the clarification.

when you talk about the quadratic component in the algorithm, I assume that
you really
mean the fact that we do all the work in a single fixed-size memory block
(the render pool),
deciding to recurse the rasterization when the input shape is too large.
(the process is called "banding" in the sources)

that would easily explain the 36x factor for very large polygons :-).
however, I'm interested in
comparing the QRasterizer algorithm to the FreeType one for typical glyph
rendering. is it
significantly better in this situation ? if so, we might want to switch to
it.

- David

2007/12/20, Lars Knoll <lars@trolltech.com>:
> 
> On Thursday 20 December 2007 22:08:51 David Turner wrote:
> > so if I understand correctly, this is a monochrome-only (not
> anti-aliased)
> > rasterizer that probably doesn't handle the subtle drop-out control
> rules
> > we need for fonts.
> 
> No, it doesn't. It basically implements the same rasterization rules as X,
> which is good for 2d graphics, but very different from what's needed for
> fonts.
> 
> The main reason we went away from the black raster was that it gave slight
> drawing errors in some cases (drawing two adjacent shapes that shared a
> line
> could sometimes lead to dropouts between them), and that it has some
> quadratic components in the algorithm. The quadratic algorithm is clearly
> not
> an issue for fonts, but for 2d drawing where some people draw polygons
> with
> 10.000 or more line segments it is.
> 
> > I'm still interested to see how this works though. Anyone has the source
> > code ?, I feel reluctant to download and unpack a 80 MB tarball just to
> see
> > this.
> 
> 
> http://labs.trolltech.com/gitweb?p=qt-snapshot;a=blob;f=src/gui/painting/qrasterizer \
> .cpp;h=0b05a3749cc0916fbb30dd885c8a92ce688c1713;hb=99271fc5eb3c9ac279a9c611f01fb794d0ed1a8c
>  
> http://labs.trolltech.com/gitweb?p=qt-snapshot;a=blob;f=src/gui/painting/qrasterizer \
> _p.h;h=3e4da2ec6d070803a52d72e34c6eb367391a904c;hb=99271fc5eb3c9ac279a9c611f01fb794d0ed1a8c
>  
> Cheers,
> Lars
> 
> > 
> > - David
> > 
> > 2007/12/18, Allan Yang, Jian Hua - SH <Allan.Yang@fmc.fujitsu.com>:
> > > "I've been working on a new rasterizer to replace the Freetype
> > > rasterizer for aliased painting in the raster paint engine, which is
> used
> > > on Windows and when rendering to a QImage. The new rasterizer is
> > > scheduled to be part of Qt 4.4, and is already available in the
> > > snapshots.
> > > 
> > > The performance of rasterizing various paths with QRasterizer compared
> to
> > > the Freetype rasterizer can bee seen in the following figure:
> > > 
> > > ……"
> > > 
> > > 
> > > 
> > > URL:
> > > 
> > > http://labs.trolltech.com/blogs/2007/08/31/rasterizing-dragons/
> > > 
> > > 
> > > 
> > > Very interesting!
> > > 
> > > 
> > > 
> > > 
> > > 
> > > Allan
> > > 
> > > _______________________________________________
> > > Freetype-devel mailing list
> > > Freetype-devel@nongnu.org
> > > http://lists.nongnu.org/mailman/listinfo/freetype-devel
> 
> 
> 


[Attachment #5 (text/html)]

thanks Lars for the clarification.<br><br>when you talk about the quadratic component \
in the algorithm, I assume that you really<br>mean the fact that we do all the work \
in a single fixed-size memory block (the render pool), <br>deciding to recurse the \
rasterization when the input shape is too large.<br>(the process is called \
&quot;banding&quot; in the sources)<br><br>that would easily explain the 36x factor \
for very large polygons :-). however, I&#39;m interested in <br>comparing the \
QRasterizer algorithm to the FreeType one for typical glyph rendering. is \
it<br>significantly better in this situation ? if so, we might want to switch to \
it.<br><br>- David<br><br><div><span class="gmail_quote"> 2007/12/20, Lars Knoll \
&lt;<a href="mailto:lars@trolltech.com">lars@trolltech.com</a>&gt;:</span><blockquote \
class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt \
0pt 0.8ex; padding-left: 1ex;"> On Thursday 20 December 2007 22:08:51 David Turner \
wrote:<br>&gt; so if I understand correctly, this is a monochrome-only (not \
anti-aliased)<br>&gt; rasterizer that probably doesn&#39;t handle the subtle drop-out \
control rules <br>&gt; we need for fonts.<br><br>No, it doesn&#39;t. It basically \
implements the same rasterization rules as X,<br>which is good for 2d graphics, but \
very different from what&#39;s needed for<br>fonts.<br><br>The main reason we went \
away from the black raster was that it gave slight <br>drawing errors in some cases \
(drawing two adjacent shapes that shared a line<br>could sometimes lead to dropouts \
between them), and that it has some<br>quadratic components in the algorithm. The \
quadratic algorithm is clearly not <br>an issue for fonts, but for 2d drawing where \
some people draw polygons with<br>10.000 or more line segments it is.<br><br>&gt; \
I&#39;m still interested to see how this works though. Anyone has the source<br>&gt; \
code ?, I feel reluctant to download and unpack a 80 MB tarball just to see <br>&gt; \
this.<br><br><a href="http://labs.trolltech.com/gitweb?p=qt-snapshot;a=blob;f=src/gui/ \
painting/qrasterizer.cpp;h=0b05a3749cc0916fbb30dd885c8a92ce688c1713;hb=99271fc5eb3c9ac \
279a9c611f01fb794d0ed1a8c">http://labs.trolltech.com/gitweb?p=qt-snapshot;a=blob;f=src \
/gui/painting/qrasterizer.cpp;h=0b05a3749cc0916fbb30dd885c8a92ce688c1713;hb=99271fc5eb3c9ac279a9c611f01fb794d0ed1a8c
 </a><br><a href="http://labs.trolltech.com/gitweb?p=qt-snapshot;a=blob;f=src/gui/pain \
ting/qrasterizer_p.h;h=3e4da2ec6d070803a52d72e34c6eb367391a904c;hb=99271fc5eb3c9ac279a \
9c611f01fb794d0ed1a8c">http://labs.trolltech.com/gitweb?p=qt-snapshot;a=blob;f=src/gui \
/painting/qrasterizer_p.h;h=3e4da2ec6d070803a52d72e34c6eb367391a904c;hb=99271fc5eb3c9ac279a9c611f01fb794d0ed1a8c
 </a><br><br>Cheers,<br>Lars<br><br>&gt;<br>&gt; - David<br>&gt;<br>&gt; 2007/12/18, \
Allan Yang, Jian Hua - SH &lt;<a \
href="mailto:Allan.Yang@fmc.fujitsu.com">Allan.Yang@fmc.fujitsu.com</a>&gt;:<br>&gt; \
&gt;&nbsp;&nbsp;&quot;I&#39;ve been working on a new rasterizer to replace the \
Freetype <br>&gt; &gt; rasterizer for aliased painting in the raster paint engine, \
which is used<br>&gt; &gt; on Windows and when rendering to a QImage. The new \
rasterizer is<br>&gt; &gt; scheduled to be part of Qt 4.4, and is already available \
in the <br>&gt; &gt; snapshots.<br>&gt; &gt;<br>&gt; &gt; The performance of \
rasterizing various paths with QRasterizer compared to<br>&gt; &gt; the Freetype \
rasterizer can bee seen in the following figure:<br>&gt; &gt;<br>&gt; &gt; ……&quot; \
<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; URL:<br>&gt; &gt;<br>&gt; &gt; \
<a href="http://labs.trolltech.com/blogs/2007/08/31/rasterizing-dragons/">http://labs.trolltech.com/blogs/2007/08/31/rasterizing-dragons/
 </a><br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; Very interesting!<br>&gt; \
&gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; Allan<br>&gt; \
&gt;<br>&gt; &gt; _______________________________________________ <br>&gt; &gt; \
Freetype-devel mailing list<br>&gt; &gt; <a \
href="mailto:Freetype-devel@nongnu.org">Freetype-devel@nongnu.org</a><br>&gt; &gt; <a \
href="http://lists.nongnu.org/mailman/listinfo/freetype-devel">http://lists.nongnu.org/mailman/listinfo/freetype-devel
 </a><br><br><br></blockquote></div><br>



_______________________________________________
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic