From: commit-queue@webkit.org Date: Fri, 17 Feb 2012 22:25:28 +0000 (+0000) Subject: [Chromium] Texture eviction doesn't show up in traces. X-Git-Tag: 070512121124~12501 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=396e0930f0863b0b4e06d372048336cc35bd22ec;p=profile%2Fivi%2Fwebkit-efl.git [Chromium] Texture eviction doesn't show up in traces. https://bugs.webkit.org/show_bug.cgi?id=78851 Patch by David Reveman 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 --- diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index 0bde95e..f174a17 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,22 @@ +2012-02-17 David Reveman + + [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 Remove unused parameters from WTF threading API diff --git a/Source/WebCore/platform/graphics/chromium/TextureManager.cpp b/Source/WebCore/platform/graphics/chromium/TextureManager.cpp index 131a9c7..0c6fe14 100644 --- a/Source/WebCore/platform/graphics/chromium/TextureManager.cpp +++ b/Source/WebCore/platform/graphics/chromium/TextureManager.cpp @@ -184,6 +184,12 @@ void TextureManager::unprotectAllTextures() 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) { @@ -194,7 +200,7 @@ void TextureManager::reduceMemoryToLimit(size_t limit) TextureInfo info = m_textures.get(token); if (info.isProtected) continue; - removeTexture(token, info); + evictTexture(token, info); foundCandidate = true; break; } diff --git a/Source/WebCore/platform/graphics/chromium/TextureManager.h b/Source/WebCore/platform/graphics/chromium/TextureManager.h index 8259adb..e4d6d38 100644 --- a/Source/WebCore/platform/graphics/chromium/TextureManager.h +++ b/Source/WebCore/platform/graphics/chromium/TextureManager.h @@ -109,6 +109,7 @@ private: void addTexture(TextureToken, TextureInfo); void removeTexture(TextureToken, TextureInfo); + void evictTexture(TextureToken, TextureInfo); HashSet m_registeredTextures;