summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Pironato <stefano.pironato@nokia.com>2010-01-08 14:22:50 +0200
committerStefano Pironato <stefano.pironato@nokia.com>2010-01-08 14:22:50 +0200
commitbf4ed81813518abd9da23aec632a2d5ecc4d186d (patch)
tree064ddafc479acc4788e4daa2f39f66ff7973c7f3
parentbdef1a949ea32c5fe0bd2926171b813cff0cee2a (diff)
downloadqt4-tools-bf4ed81813518abd9da23aec632a2d5ecc4d186d.tar.gz
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
-rw-r--r--src/gui/painting/qtextureglyphcache.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/painting/qtextureglyphcache.cpp b/src/gui/painting/qtextureglyphcache.cpp
index 46fbaa958c..27dbcf93d0 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<glyph_t, Coord>::iterator iter = listItemCoordinates.begin();