summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@trolltech.com>2010-03-15 06:30:58 (GMT)
committerGunnar Sletta <gunnar@trolltech.com>2010-03-15 13:27:50 (GMT)
commit73884b00e1ab5b064c605ac3430558412692cf5f (patch)
tree4d384412f4c1f35f20f899f54cfa2ac5ddc615be
parentfd2409d3a8ae78f6081adca8b71a42e862659c84 (diff)
downloadQt-73884b00e1ab5b064c605ac3430558412692cf5f.zip
Qt-73884b00e1ab5b064c605ac3430558412692cf5f.tar.gz
Qt-73884b00e1ab5b064c605ac3430558412692cf5f.tar.bz2
Fixed wasted space in the texture cache.
We were using the height of the texture to position the next row, rather than just adding the rowHeight. This used to work when the texture cached grew by rowHeight, now it grows to next power of two... Reviewed-by: Eskil
-rw-r--r--src/gui/painting/qtextureglyphcache.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/painting/qtextureglyphcache.cpp b/src/gui/painting/qtextureglyphcache.cpp
index fc8b3e7..4a563ed 100644
--- a/src/gui/painting/qtextureglyphcache.cpp
+++ b/src/gui/painting/qtextureglyphcache.cpp
@@ -136,7 +136,7 @@ void QTextureGlyphCache::populate(QFontEngine *fontEngine, int numGlyphs, const
if (m_cx + c.w > m_w) {
// no room on the current line, start new glyph strip
m_cx = 0;
- m_cy = m_h;
+ m_cy += rowHeight;
}
if (m_cy + c.h > m_h) {
int new_height = m_h*2;