diff options
author | Tom Cooksey <thomas.cooksey@nokia.com> | 2009-05-06 11:05:02 (GMT) |
---|---|---|
committer | Tom Cooksey <thomas.cooksey@nokia.com> | 2009-05-06 11:05:02 (GMT) |
commit | 6395cd6d6ccbf0c15f77ef3061a0bac7189c575b (patch) | |
tree | 1322b249c2c935394a491c4dbfe531e6b97ab580 /src/gui/painting/qpaintengine_raster.cpp | |
parent | ae3c71bcc588f4b11158cb943c7dd453f066efc6 (diff) | |
parent | 7d6281973f8b0a5b53e63952f0d03624e6020454 (diff) | |
download | Qt-6395cd6d6ccbf0c15f77ef3061a0bac7189c575b.zip Qt-6395cd6d6ccbf0c15f77ef3061a0bac7189c575b.tar.gz Qt-6395cd6d6ccbf0c15f77ef3061a0bac7189c575b.tar.bz2 |
Merge branch 'gl2engine-new-shaders' into graphics-master
Conflicts:
src/gui/painting/qpaintengine_raster.cpp
Diffstat (limited to 'src/gui/painting/qpaintengine_raster.cpp')
-rw-r--r-- | src/gui/painting/qpaintengine_raster.cpp | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index f950bad..9237e11 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -1144,6 +1144,33 @@ void QRasterPaintEnginePrivate::updateMatrixData(QSpanData *spanData, const QBru } } +// #define QT_CLIPPING_RATIOS + +#ifdef QT_CLIPPING_RATIOS +int rectClips; +int regionClips; +int totalClips; + +static void checkClipRatios(QRasterPaintEnginePrivate *d) +{ + if (d->clip()->hasRectClip) + rectClips++; + if (d->clip()->hasRegionClip) + regionClips++; + totalClips++; + + if ((totalClips % 5000) == 0) { + printf("Clipping ratio: rectangular=%f%%, region=%f%%, complex=%f%%\n", + rectClips * 100.0 / (qreal) totalClips, + regionClips * 100.0 / (qreal) totalClips, + (totalClips - rectClips - regionClips) * 100.0 / (qreal) totalClips); + totalClips = 0; + rectClips = 0; + regionClips = 0; + } + +} +#endif static void qrasterpaintengine_state_setNoClip(QRasterPaintEngineState *s) { @@ -3192,7 +3219,7 @@ void QRasterPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textIte // ### cases we should delegate painting to the font engine // ### directly... -#if defined(Q_WS_WIN) && !defined(Q_OS_WINCE) +#if defined(Q_WS_WIN) && !defined(Q_WS_WINCE) QFontEngine::Type fontEngineType = ti.fontEngine->type(); // qDebug() << "type" << fontEngineType << s->matrix.type(); if ((fontEngineType == QFontEngine::Win && !((QFontEngineWin *) ti.fontEngine)->ttf && s->matrix.type() > QTransform::TxTranslate) @@ -4438,6 +4465,9 @@ void QClipData::fixup() */ void QClipData::setClipRect(const QRect &rect) { + if (rect == clipRect) + return; + // qDebug() << "setClipRect" << clipSpanHeight << count << allocated << rect; hasRectClip = true; hasRegionClip = false; @@ -4453,7 +4483,6 @@ void QClipData::setClipRect(const QRect &rect) m_spans = 0; } - // qDebug() << xmin << xmax << ymin << ymax; } |