summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpaintengine_raster_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2010-12-10 23:03:14 (GMT)
committerSamuel Rødal <samuel.rodal@nokia.com>2010-12-15 12:17:20 (GMT)
commit21b1b5a9af95af10b281176564f14cafa2339006 (patch)
treea12805ac1a90419addd2a9c5e1d134eff66c1148 /src/gui/painting/qpaintengine_raster_p.h
parente0aa9897bc2d04054cc65dbe3452bee2ed2eacd8 (diff)
downloadQt-21b1b5a9af95af10b281176564f14cafa2339006.zip
Qt-21b1b5a9af95af10b281176564f14cafa2339006.tar.gz
Qt-21b1b5a9af95af10b281176564f14cafa2339006.tar.bz2
Improve performance of clipping to a scaled QRectF
Clipping to a scaled QRectF was so far hitting the slow code path in the raster paintengine that generates clip spans for every line. This is not needed as we also clip translated QRectF's to integer rects. This patch does the same for scaled rectangles and ensures the clipping really happens at the closest pixel boundary. Reviewed-by: Samuel
Diffstat (limited to 'src/gui/painting/qpaintengine_raster_p.h')
-rw-r--r--src/gui/painting/qpaintengine_raster_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/painting/qpaintengine_raster_p.h b/src/gui/painting/qpaintengine_raster_p.h
index 1016f8d..7d4d3b6 100644
--- a/src/gui/painting/qpaintengine_raster_p.h
+++ b/src/gui/painting/qpaintengine_raster_p.h
@@ -266,6 +266,8 @@ private:
void drawGlyphsS60(const QPointF &p, const QTextItemInt &ti);
#endif // Q_OS_SYMBIAN && QT_NO_FREETYPE
+ bool setClipRectInDeviceCoords(const QRect &r, Qt::ClipOperation op);
+
inline void ensureBrush(const QBrush &brush) {
if (!qbrush_fast_equals(state()->lastBrush, brush) || (brush.style() != Qt::NoBrush && state()->fillFlags))
updateBrush(brush);