From 1f806aa1b40db276dad359863d018171080d93f9 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Thu, 14 Apr 2011 21:38:45 +0200 Subject: 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/qpaintengine_raster_p.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/gui/painting/qpaintengine_raster_p.h') diff --git a/src/gui/painting/qpaintengine_raster_p.h b/src/gui/painting/qpaintengine_raster_p.h index 52f51fab16..122c2b868a 100644 --- a/src/gui/painting/qpaintengine_raster_p.h +++ b/src/gui/painting/qpaintengine_raster_p.h @@ -196,9 +196,6 @@ public: void stroke(const QVectorPath &path, const QPen &pen); void fill(const QVectorPath &path, const QBrush &brush); - void strokePolygonCosmetic(const QPoint *pts, int pointCount, PolygonDrawMode mode); - void strokePolygonCosmetic(const QPointF *pt, int pointCount, PolygonDrawMode mode); - void clip(const QVectorPath &path, Qt::ClipOperation op); void clip(const QRect &rect, Qt::ClipOperation op); void clip(const QRegion ®ion, Qt::ClipOperation op); @@ -328,8 +325,6 @@ public: bool isUnclipped_normalized(const QRect &rect) const; bool isUnclipped(const QRect &rect, int penWidth) const; bool isUnclipped(const QRectF &rect, int penWidth) const; - ProcessSpans getPenFunc(const QRect &rect, const QSpanData *data) const; - ProcessSpans getPenFunc(const QRectF &rect, const QSpanData *data) const; ProcessSpans getBrushFunc(const QRect &rect, const QSpanData *data) const; ProcessSpans getBrushFunc(const QRectF &rect, const QSpanData *data) const; -- cgit v1.2.3