diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> | 2013-07-04 13:57:04 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-07-05 15:41:30 +0200 |
commit | b5520af6a9360d0032b6a54b1492147462cff91a (patch) | |
tree | 5ea079799f5e440cf705502df0f3ef12055f3595 /src/gui/painting/qpaintengine_raster.cpp | |
parent | 568f82fba397e06a26b4fd40f074e4432d02d248 (diff) |
REG: Fix crash when mixing projected/unprojected text painting
Due to a refactoring done in Qt 5.1, we would try to do projected
text painting using the glyph cache in the raster engine (the logic
to avoid this was removed when refactoring). If you only did the
projected text drawing, then you would get unprojected text with
projected glyph positions and it would look wrong.
What's worse: If you first drew unprojected text with the same
font engine, so that the font engine already had a glyph cache
stored, we would hit an assert in qtransform_equals_no_translate
which assumes cached drawing is never used for projected painters.
This puts back the logic that we never cache projected text in
the glyph cache.
Task-number: QTBUG-32193
Change-Id: I1f919961c4cf498a9c4a0b1ceb0df1937ed0d067
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Diffstat (limited to 'src/gui/painting/qpaintengine_raster.cpp')
-rw-r--r-- | src/gui/painting/qpaintengine_raster.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index 66a4a43cba..fb3328090b 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -3327,6 +3327,10 @@ bool QRasterPaintEngine::requiresPretransformedGlyphPositions(QFontEngine *fontE bool QRasterPaintEngine::shouldDrawCachedGlyphs(QFontEngine *fontEngine, const QTransform &m) const { + // The raster engine does not support projected cached glyph drawing + if (m.type() >= QTransform::TxProject) + return false; + // The font engine might not support filling the glyph cache // with the given transform applied, in which case we need to // fall back to the QPainterPath code-path. |