aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/qsgdefaultglyphnode_p_p.h
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>2013-08-23 10:31:22 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-27 13:43:10 +0200
commitf450edb84e5f19ddd77b5828b94f66589a98512e (patch)
treeb424ae9faea10b50c9464fc80949149704577fbe /src/quick/scenegraph/qsgdefaultglyphnode_p_p.h
parent703962c13ff0f4c6a399ba49ee2f0cd9681d7454 (diff)
Fix girth of native text with grayscale AA or style
When using a grayscale glyph cache, the source data should be interpreted differently, like in the OpenGL paint engine. We should not do srgb gamma correction and we should use the default blend mode. This also fixes styled text, since that will always default to a grayscale glyph cache. This patch ensures: 1. That we detect when the font requires grayscale AA (e.g. when font smoothing is turned off in the OS) 2. That we interpret the source data correctly. Task-number: QTBUG-31720 Change-Id: I600f4a28cd443caa0a8d5544d219b47436cde693 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Diffstat (limited to 'src/quick/scenegraph/qsgdefaultglyphnode_p_p.h')
-rw-r--r--src/quick/scenegraph/qsgdefaultglyphnode_p_p.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/quick/scenegraph/qsgdefaultglyphnode_p_p.h b/src/quick/scenegraph/qsgdefaultglyphnode_p_p.h
index d1a739de88..ddfc72a4e6 100644
--- a/src/quick/scenegraph/qsgdefaultglyphnode_p_p.h
+++ b/src/quick/scenegraph/qsgdefaultglyphnode_p_p.h
@@ -59,8 +59,7 @@ class Geometry;
class QSGTextMaskMaterial: public QSGMaterial
{
public:
- QSGTextMaskMaterial(const QRawFont &font,
- QFontEngineGlyphCache::Type cacheType = QFontEngineGlyphCache::Raster_RGBMask);
+ QSGTextMaskMaterial(const QRawFont &font, int cacheType = -1);
virtual ~QSGTextMaskMaterial();
virtual QSGMaterialType *type() const;
@@ -84,10 +83,9 @@ public:
const QMargins &margins = QMargins(0, 0, 0, 0));
private:
- void init();
+ void init(int cacheType);
QSGPlainTexture *m_texture;
- QFontEngineGlyphCache::Type m_cacheType;
QExplicitlySharedDataPointer<QFontEngineGlyphCache> m_glyphCache;
QRawFont m_font;
QColor m_color;