diff options
author | Yoann Lopes <yoann.lopes@digia.com> | 2013-08-21 14:40:01 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-08-27 20:35:55 +0200 |
commit | 184e27c0e69f9f8c342339e83cdf79ec5a97b58e (patch) | |
tree | 0529dcf5a0b5b86b98c40d257f69ecb7dcb9b3ee /src/quick/scenegraph/qsgdefaultdistancefieldglyphcache_p.h | |
parent | cb9672c86d2679bcb0d9e10f76b12eb03f4c515e (diff) |
Updated distance field glyph caches to use QDistanceField.
Some OpenGL drivers assume alpha-only images are always tightly packed,
regardless of what is set for GL_UNPACK_ALIGNMENT. We now use
QDistanceField to store glyphs, which aligns scanlines on a 1-byte
boundary, instead of QImage which uses a 4-byte boundary. A previous
workaround uploaded scanlines one at a time, but this is also broken
with some other drivers...
Task-number: QTBUG-30908
Task-number: QTBUG-32861
Change-Id: I46527fb48de1e00116f776427c45baa752c6176d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src/quick/scenegraph/qsgdefaultdistancefieldglyphcache_p.h')
-rw-r--r-- | src/quick/scenegraph/qsgdefaultdistancefieldglyphcache_p.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache_p.h b/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache_p.h index ef722d85df..4ce3a50d1b 100644 --- a/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache_p.h +++ b/src/quick/scenegraph/qsgdefaultdistancefieldglyphcache_p.h @@ -58,7 +58,7 @@ public: virtual ~QSGDefaultDistanceFieldGlyphCache(); void requestGlyphs(const QSet<glyph_t> &glyphs); - void storeGlyphs(const QHash<glyph_t, QImage> &glyphs); + void storeGlyphs(const QList<QDistanceField> &glyphs); void referenceGlyphs(const QSet<glyph_t> &glyphs); void releaseGlyphs(const QSet<glyph_t> &glyphs); @@ -73,7 +73,7 @@ private: GLuint texture; QSize size; QRect allocatedArea; - QImage image; + QDistanceField image; TextureInfo() : texture(0) { } |