From bf4ed81813518abd9da23aec632a2d5ecc4d186d Mon Sep 17 00:00:00 2001 From: Stefano Pironato Date: Fri, 8 Jan 2010 14:22:50 +0200 Subject: Add texture glyph width cache default. For maemo6 need to increase the cache width to 1024 to avoid text corruption using SGX 1.4. Reviewed-by: Tom Cooksey Reviewed-by: Harald Fernengel --- src/gui/painting/qtextureglyphcache.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gui/painting/qtextureglyphcache.cpp b/src/gui/painting/qtextureglyphcache.cpp index 46fbaa9..27dbcf9 100644 --- a/src/gui/painting/qtextureglyphcache.cpp +++ b/src/gui/painting/qtextureglyphcache.cpp @@ -47,6 +47,10 @@ #include "private/qnativeimage_p.h" #include "private/qfontengine_ft_p.h" +#ifndef QT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH +#define QT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH 256 +#endif + QT_BEGIN_NAMESPACE // #define CACHE_DEBUG @@ -112,7 +116,7 @@ void QTextureGlyphCache::populate(const QTextItemInt &ti, rowHeight += margin * 2; if (isNull()) - createCache(256, rowHeight); + createCache(QT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH, rowHeight); // now actually use the coords and paint the wanted glyps into cache. QHash::iterator iter = listItemCoordinates.begin(); -- cgit v0.12