OSDN Git Service
(root)
/
kde
/
Katie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8f48847
)
use static immutable color table in QFontEngineFT::alphaMapForGlyph()
author
Ivailo Monev
<xakepa10@gmail.com>
Tue, 14 Sep 2021 22:09:40 +0000
(
01:09
+0300)
committer
Ivailo Monev
<xakepa10@gmail.com>
Tue, 14 Sep 2021 22:09:40 +0000
(
01:09
+0300)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/gui/text/qfontengine_ft.cpp
patch
|
blob
|
history
diff --git
a/src/gui/text/qfontengine_ft.cpp
b/src/gui/text/qfontengine_ft.cpp
index
f336bab
..
2477beb
100644
(file)
--- a/
src/gui/text/qfontengine_ft.cpp
+++ b/
src/gui/text/qfontengine_ft.cpp
@@
-1696,9
+1696,7
@@
QImage QFontEngineFT::alphaMapForGlyph(glyph_t g, QFixed subPixelPosition)
if (antialias) {
img.setColorTable(alphaColorTable());
} else {
- QVector<QRgb> colors(2);
- colors[0] = qt_transparentrgba;
- colors[1] = qt_blackrgba;
+ static const QVector<QRgb> colors = { qt_transparentrgba, qt_blackrgba };
img.setColorTable(colors);
}
Q_ASSERT(img.bytesPerLine() == pitch);