Fix girth of native text with grayscale AA or style
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Fri, 23 Aug 2013 08:31:22 +0000 (10:31 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 27 Aug 2013 11:43:10 +0000 (13:43 +0200)
commitf450edb84e5f19ddd77b5828b94f66589a98512e
treeb424ae9faea10b50c9464fc80949149704577fbe
parent703962c13ff0f4c6a399ba49ee2f0cd9681d7454
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>
src/quick/scenegraph/qsgdefaultglyphnode_p.cpp
src/quick/scenegraph/qsgdefaultglyphnode_p_p.h