New algorithm for drawing thin lines
authorLars Knoll <lars.knoll@nokia.com>
Thu, 14 Apr 2011 19:38:45 +0000 (21:38 +0200)
committerLars Knoll <lars.knoll@nokia.com>
Thu, 12 May 2011 08:36:29 +0000 (10:36 +0200)
commit1f806aa1b40db276dad359863d018171080d93f9
tree5a0f8fee94b4d478d7d8c3eaa5d1574ece2d90ca
parente40443f7dfaa77e1295390385ef76f9b4e87c59b
New algorithm for drawing thin lines

Added a new QCosmeticStroker class for drawing thin
lines. The class can handle both aliased and antialiased
lines.

The code replaces all the midpoint line drawing algorithms in
the raster paintengine and gives correct subpixel positioning
for lines.

It gives around 30% to 50% speedup against the midpoint algorithm. If
we missed that fast path, the speedup is around between a factor of
6 to 8 for lines and aliased paths and 100 and 400 for antialiased
paths.

Reviewed-by: Kim
(cherry picked from commit 37c329a3e35fabc88fbcad824a69f37c671d2132)
src/gui/painting/painting.pri
src/gui/painting/qcosmeticstroker.cpp [new file with mode: 0644]
src/gui/painting/qcosmeticstroker_p.h [new file with mode: 0644]
src/gui/painting/qpaintengine_raster.cpp
src/gui/painting/qpaintengine_raster_p.h
src/gui/painting/qpaintengineex.cpp