Title: [93523] trunk/Source/WebCore
Revision
93523
Author
[email protected]
Date
2011-08-22 11:18:59 -0700 (Mon, 22 Aug 2011)

Log Message

[chromium] Content and render surface textures not freed when compositor context destroyed
https://bugs.webkit.org/show_bug.cgi?id=66589

Patch by James Robinson <[email protected]> on 2011-08-22
Reviewed by Kenneth Russell.

Explicitly delete all managed textures when destroying the compositor
context.  This regressed due to a combination of using share groups
(so destroying a context no longer implicitly releases all resources
in that context) and switching the TextureManager over to support
deferred texture destruction.

We sadly don't have a way to construct automated tests for resource
leaks currently.

* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::cleanupSharedObjects):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (93522 => 93523)


--- trunk/Source/WebCore/ChangeLog	2011-08-22 18:15:48 UTC (rev 93522)
+++ trunk/Source/WebCore/ChangeLog	2011-08-22 18:18:59 UTC (rev 93523)
@@ -1,3 +1,22 @@
+2011-08-22  James Robinson  <[email protected]>
+
+        [chromium] Content and render surface textures not freed when compositor context destroyed
+        https://bugs.webkit.org/show_bug.cgi?id=66589
+
+        Reviewed by Kenneth Russell.
+
+        Explicitly delete all managed textures when destroying the compositor
+        context.  This regressed due to a combination of using share groups
+        (so destroying a context no longer implicitly releases all resources
+        in that context) and switching the TextureManager over to support
+        deferred texture destruction.
+
+        We sadly don't have a way to construct automated tests for resource
+        leaks currently.
+
+        * platform/graphics/chromium/LayerRendererChromium.cpp:
+        (WebCore::LayerRendererChromium::cleanupSharedObjects):
+
 2011-08-22  Nate Chapin  <[email protected]>
 
         Unload events can crash us when they blank out

Modified: trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp (93522 => 93523)


--- trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp	2011-08-22 18:15:48 UTC (rev 93522)
+++ trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp	2011-08-22 18:18:59 UTC (rev 93523)
@@ -1283,7 +1283,13 @@
         GLC(m_context.get(), m_context->deleteFramebuffer(m_offscreenFramebufferId));
 
     // Clear tilers before the texture manager, as they have references to textures.
+    m_contentsTextureManager->unprotectAllTextures();
+    m_contentsTextureManager->reduceMemoryToLimit(0);
+    m_contentsTextureManager->deleteEvictedTextures(m_context.get());
     m_contentsTextureManager.clear();
+    m_renderSurfaceTextureManager->unprotectAllTextures();
+    m_renderSurfaceTextureManager->reduceMemoryToLimit(0);
+    m_renderSurfaceTextureManager->deleteEvictedTextures(m_context.get());
     m_renderSurfaceTextureManager.clear();
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to