diff options
author | Gunnar Sletta <gunnar.sletta@digia.com> | 2013-09-04 15:17:05 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-05 09:48:22 +0200 |
commit | 35bc3dc45aacaf36a8bdfccc7627136cc2e5b185 (patch) | |
tree | 355aa9a3e4d56c42f1c068cc66caa9e6fcaa059b /src/plugins/platforms/windows/qwindowsfontengine.h | |
parent | 0b481f28d19e9ae8389f535c70865658a5e7e189 (diff) |
Rely solely on alphaMapBoundingBox in QTextureGlyphCache
We're currently adding a lot of transparent pixels to the cache,
wasting both memory and cpu cycles while drawing. AlphaMapBoundingBox
was introduced to return the exact same bounds as the alphaMapForGlyph
function so we should only rely on this instead of adding arbitrary
padding and margins all over the place.
Windows still has an arbitrary +4 in the its drawGDIGlyph() which
means batching will not work on windows, but at least now
other platforms do not need to suffer.
Change-Id: I714903fa195004400c09c3bf6570e46179775f09
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsfontengine.h')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsfontengine.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/platforms/windows/qwindowsfontengine.h b/src/plugins/platforms/windows/qwindowsfontengine.h index 9e92a8fbff..60ff61fcb9 100644 --- a/src/plugins/platforms/windows/qwindowsfontengine.h +++ b/src/plugins/platforms/windows/qwindowsfontengine.h @@ -121,6 +121,7 @@ public: virtual QImage alphaMapForGlyph(glyph_t t) { return alphaMapForGlyph(t, QTransform()); } virtual QImage alphaMapForGlyph(glyph_t, const QTransform &xform); virtual QImage alphaRGBMapForGlyph(glyph_t t, QFixed subPixelPosition, const QTransform &xform); + virtual glyph_metrics_t alphaMapBoundingBox(glyph_t glyph, QFixed, const QTransform &matrix, GlyphFormat); virtual QFontEngine *cloneWithSize(qreal pixelSize) const; virtual bool supportsTransformation(const QTransform &transform) const; |