diff options
-rw-r--r-- | src/opengl/qgl.cpp | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index dc7a333..63df8c3 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -1853,18 +1853,6 @@ QGLTextureCache::~QGLTextureCache() 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); } |