Skip to content
Permalink
Browse files
[chromium] Content and render surface textures not freed when composi…
…tor context destroyed

https://bugs.webkit.org/show_bug.cgi?id=66589

Patch by James Robinson <jamesr@chromium.org> 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):

Canonical link: https://commits.webkit.org/82505@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@93523 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
jamesr authored and webkit-commit-queue committed Aug 22, 2011
1 parent 7fbfd80 commit 6461e29fc7c5f3b8a1a7e8e85140483285a3556e
Showing 2 changed files with 25 additions and 0 deletions.
@@ -1,3 +1,22 @@
2011-08-22 James Robinson <jamesr@chromium.org>

[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 <japhet@chromium.org>

Unload events can crash us when they blank out
@@ -1283,7 +1283,13 @@ void LayerRendererChromium::cleanupSharedObjects()
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();
}

0 comments on commit 6461e29

Please sign in to comment.