diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-01-07 11:29:04 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-01-10 00:29:08 +0100 |
commit | f1e5c5575cc362bc23da500d069dc98e082492e4 (patch) | |
tree | 3b7f8f408515344277bfc36535fc5cd2cff13b77 /src/gui/painting/qtextureglyphcache.cpp | |
parent | 97645478de3ceffce11f58eab140c4c775e48be5 (diff) |
Remove use of QImage::alphaChannel()
A direct logical replacement. Not sure what is going on though or why
an inversion is necessary, but logic is unchanged.
Change-Id: Id9b5531895371f6467018fa82336aff6238ae126
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/gui/painting/qtextureglyphcache.cpp')
-rw-r--r-- | src/gui/painting/qtextureglyphcache.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/painting/qtextureglyphcache.cpp b/src/gui/painting/qtextureglyphcache.cpp index f40ca9d8b4..91214f27ca 100644 --- a/src/gui/painting/qtextureglyphcache.cpp +++ b/src/gui/painting/qtextureglyphcache.cpp @@ -341,9 +341,10 @@ void QImageTextureGlyphCache::fillTexture(const Coord &c, glyph_t g, QFixed subP } else if (m_format == QFontEngine::Format_Mono) { if (mask.depth() > 1) { // TODO optimize this - mask = mask.alphaChannel(); + mask.convertTo(QImage::Format_Alpha8); + mask.reinterpretAsFormat(QImage::Format_Grayscale8); mask.invertPixels(); - mask = mask.convertToFormat(QImage::Format_Mono, Qt::ThresholdDither); + mask.convertTo(QImage::Format_Mono, Qt::ThresholdDither); } int mw = qMin(mask.width(), c.w); |