summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorStefano Pironato <stefano.pironato@nokia.com>2010-01-08 12:22:50 (GMT)
committerStefano Pironato <stefano.pironato@nokia.com>2010-01-08 12:22:50 (GMT)
commitbf4ed81813518abd9da23aec632a2d5ecc4d186d (patch)
tree064ddafc479acc4788e4daa2f39f66ff7973c7f3 /src/gui
parentbdef1a949ea32c5fe0bd2926171b813cff0cee2a (diff)
downloadQt-bf4ed81813518abd9da23aec632a2d5ecc4d186d.zip
Qt-bf4ed81813518abd9da23aec632a2d5ecc4d186d.tar.gz
Qt-bf4ed81813518abd9da23aec632a2d5ecc4d186d.tar.bz2
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
Diffstat (limited to 'src/gui')
-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 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<glyph_t, Coord>::iterator iter = listItemCoordinates.begin();