diff options
author | Nicolas Roard <nicolasroard@google.com> | 2011-09-28 19:08:00 -0700 |
---|---|---|
committer | Nicolas Roard <nicolasroard@google.com> | 2011-09-29 13:13:17 -0700 |
commit | 74523e723bc5677780989d6a5834adc5c72c3683 (patch) | |
tree | f88f6888f48a88348ca4e49c47eda904c944d581 /Source/WebCore/platform/graphics/android/GLWebViewState.cpp | |
parent | 852641461c4dedc4682153d1299b2a9b6fde6ea2 (diff) | |
download | external_webkit-74523e723bc5677780989d6a5834adc5c72c3683.zip external_webkit-74523e723bc5677780989d6a5834adc5c72c3683.tar.gz external_webkit-74523e723bc5677780989d6a5834adc5c72c3683.tar.bz2 |
Fix a memory leak with LayerAndroid
(we had a cycle between LayerAndroid and PaintedSurface)
bug:5366807
Change-Id: I1b7341984b3cc6fd998b9ab54205bb963eb9223d
Diffstat (limited to 'Source/WebCore/platform/graphics/android/GLWebViewState.cpp')
-rw-r--r-- | Source/WebCore/platform/graphics/android/GLWebViewState.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp index cd93f36..2f3613b 100644 --- a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp +++ b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp @@ -116,6 +116,10 @@ GLWebViewState::GLWebViewState(android::Mutex* buttonMutex) GLWebViewState::~GLWebViewState() { + // Unref the existing tree/PaintedSurfaces + if (m_previouslyUsedRoot) + TilesManager::instance()->swapLayersTextures(m_previouslyUsedRoot, 0); + // Take care of the transfer queue such that Tex Gen thread will not stuck TilesManager::instance()->unregisterGLWebViewState(this); |