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>
This commit is contained in:
parent
97645478de
commit
f1e5c5575c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user