[Chromium] Texture eviction doesn't show up in traces.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Feb 2012 22:25:28 +0000 (22:25 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Feb 2012 22:25:28 +0000 (22:25 +0000)
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

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/chromium/TextureManager.cpp
Source/WebCore/platform/graphics/chromium/TextureManager.h

index 0bde95e..f174a17 100644 (file)
@@ -1,3 +1,22 @@
+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
index 131a9c7..0c6fe14 100644 (file)
@@ -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;
         }
index 8259adb..e4d6d38 100644 (file)
@@ -109,6 +109,7 @@ private:
 
     void addTexture(TextureToken, TextureInfo);
     void removeTexture(TextureToken, TextureInfo);
+    void evictTexture(TextureToken, TextureInfo);
 
     HashSet<ManagedTexture*> m_registeredTextures;