Add padding to distance field glyph cache
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Thu, 6 Nov 2014 11:10:00 +0000 (12:10 +0100)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Tue, 11 Nov 2014 13:30:26 +0000 (14:30 +0100)
commitb5403efcb103423f44c707db4b07df0ff5c2203b
treeebcea41b78200a052dde9d606f74ef29a85b782a
parent868def84fe800aaba937159814388249ebbaf914
Add padding to distance field glyph cache

Linear filtering can cause pixels outside the glyph's bounding rect
to be sampled. On drivers where uninitialized texture data is actually
uninitialized, this could cause artifacts in rendering for glyphs at
the right edge of the initiliazed area since they would sometimes sample
random pixels. To avoid this, we add padding between the glyphs in the
cache.

[ChangeLog][Qt Quick] Fixed uncommon artifacts in rendering of distance
field glyphs.

Task-number: QTBUG-42148
Change-Id: I6982b4a150d9459185d50a4362e1ead588d3860f
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
src/quick/scenegraph/qsgdefaultdistancefieldglyphcache.cpp
src/quick/scenegraph/qsgdefaultdistancefieldglyphcache_p.h