summaryrefslogtreecommitdiffstats
path: root/config.profiles/harmattan/patches/qgltexturecache.diff
blob: 0fa8ad24a70ea32b56b6a4fe2ff04109f6ec4187 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Index: qt-maemo-qtp/src/opengl/qgl.cpp
===================================================================
--- qt-maemo-qtp.orig/src/opengl/qgl.cpp
+++ qt-maemo-qtp/src/opengl/qgl.cpp
@@ -1831,18 +1831,6 @@
 void QGLTextureCache::insert(QGLContext* ctx, qint64 key, QGLTexture* texture, int cost)
 {
     QWriteLocker locker(&m_lock);
-    if (m_cache.totalCost() + cost > m_cache.maxCost()) {
-        // the cache is full - make an attempt to remove something
-        const QList<QGLTextureCacheKey> keys = m_cache.keys();
-        int i = 0;
-        while (i < m_cache.count()
-               && (m_cache.totalCost() + cost > m_cache.maxCost())) {
-            QGLTexture *tex = m_cache.object(keys.at(i));
-            if (tex->context == ctx)
-                m_cache.remove(keys.at(i));
-            ++i;
-        }
-    }
     const QGLTextureCacheKey cacheKey = {key, QGLContextPrivate::contextGroup(ctx)};
     m_cache.insert(cacheKey, texture, cost);
 }