https://bugs.webkit.org/show_bug.cgi?id=78851
Patch by David Reveman <reveman@chromium.org> on 2012-02-17
Reviewed by James Robinson.
Add TextureManager::evictTexture() function with TRACE statement so
that texture eviction shows up in traces.
No new tests.
* platform/graphics/chromium/TextureManager.cpp:
(WebCore::TextureManager::evictTexture):
(WebCore):
(WebCore::TextureManager::reduceMemoryToLimit):
* platform/graphics/chromium/TextureManager.h:
(TextureManager):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108124
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-02-17 David Reveman <reveman@chromium.org>
+
+ [Chromium] Texture eviction doesn't show up in traces.
+ https://bugs.webkit.org/show_bug.cgi?id=78851
+
+ Reviewed by James Robinson.
+
+ Add TextureManager::evictTexture() function with TRACE statement so
+ that texture eviction shows up in traces.
+
+ No new tests.
+
+ * platform/graphics/chromium/TextureManager.cpp:
+ (WebCore::TextureManager::evictTexture):
+ (WebCore):
+ (WebCore::TextureManager::reduceMemoryToLimit):
+ * platform/graphics/chromium/TextureManager.h:
+ (TextureManager):
+
2012-02-17 Kalev Lember <kalevlember@gmail.com>
Remove unused parameters from WTF threading API
it->second.isProtected = false;
}
+void TextureManager::evictTexture(TextureToken token, TextureInfo info)
+{
+ TRACE_EVENT("TextureManager::evictTexture", this, 0);
+ removeTexture(token, info);
+}
+
void TextureManager::reduceMemoryToLimit(size_t limit)
{
while (m_memoryUseBytes > limit) {
TextureInfo info = m_textures.get(token);
if (info.isProtected)
continue;
- removeTexture(token, info);
+ evictTexture(token, info);
foundCandidate = true;
break;
}
void addTexture(TextureToken, TextureInfo);
void removeTexture(TextureToken, TextureInfo);
+ void evictTexture(TextureToken, TextureInfo);
HashSet<ManagedTexture*> m_registeredTextures;