From f1e5c5575cc362bc23da500d069dc98e082492e4 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 7 Jan 2020 11:29:04 +0100 Subject: 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 Reviewed-by: Eirik Aavitsland --- src/gui/painting/qtextureglyphcache.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') 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); -- cgit v1.2.3