summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2014-10-09 15:17:58 +0200
committerAllan Sandfeld Jensen <allan.jensen@digia.com>2014-10-13 18:03:40 +0200
commit29e679bed9fe08cb0713760554e412525dc6ce26 (patch)
tree2d15387aee95947de0a5e532af0204d9c56b9632
parent6c35eb5f0ff17d02166ca144eef8792acf2acd63 (diff)
Fix access of non-existing color table
Since alphaMapForGlyph now returns images in alpha8 format, they no longer have a colortable, so we need to fix the fallback implementation of alphaRGBMapForGlyph from trying to access it. Task-number: QTBUG-41855 Change-Id: I232089163cfc817d7cf16df566f05629a968bf12 Reviewed-by: Ulf Hermann <ulf.hermann@digia.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
-rw-r--r--src/gui/text/qfontengine.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp
index 5826bfbb39..fe0f9fa943 100644
--- a/src/gui/text/qfontengine.cpp
+++ b/src/gui/text/qfontengine.cpp
@@ -787,12 +787,11 @@ QImage QFontEngine::alphaRGBMapForGlyph(glyph_t glyph, QFixed /*subPixelPosition
QImage alphaMask = alphaMapForGlyph(glyph, t);
QImage rgbMask(alphaMask.width(), alphaMask.height(), QImage::Format_RGB32);
- QVector<QRgb> colorTable = alphaMask.colorTable();
for (int y=0; y<alphaMask.height(); ++y) {
uint *dst = (uint *) rgbMask.scanLine(y);
uchar *src = (uchar *) alphaMask.scanLine(y);
for (int x=0; x<alphaMask.width(); ++x) {
- int val = qAlpha(colorTable.at(src[x]));
+ int val = src[x];
dst[x] = qRgb(val, val, val);
}
}