src/gui/painting/qtextureglyphcache.cpp
changeset 7 f7bc934e204c
parent 3 41300fa6a67c
child 29 b72c6db6890b
--- a/src/gui/painting/qtextureglyphcache.cpp	Tue Feb 02 00:43:10 2010 +0200
+++ b/src/gui/painting/qtextureglyphcache.cpp	Wed Mar 31 11:06:36 2010 +0300
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
 ** All rights reserved.
 ** Contact: Nokia Corporation (qt-info@nokia.com)
 **
@@ -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 @@
 
     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();