From 48605bf1f6bc77a1f037f23285baf7706f45d198 Mon Sep 17 00:00:00 2001 From: Chris Craik Date: Fri, 18 May 2012 17:02:33 -0700 Subject: Remove paint tile operations for stale painters bug:6516612 also adds ClassTracker to several classes Change-Id: I9a503084240d4935fba300a3256d266a2982dcc0 --- .../graphics/android/rendering/SurfaceCollectionManager.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.cpp') diff --git a/Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.cpp b/Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.cpp index 5abca02..724bf89 100644 --- a/Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.cpp +++ b/Source/WebCore/platform/graphics/android/rendering/SurfaceCollectionManager.cpp @@ -69,6 +69,7 @@ void SurfaceCollectionManager::swap() if (m_drawingCollection) { ALOGV("destroying drawing collection %p", m_drawingCollection); m_drawingCollection->addFrameworkInvals(); + m_drawingCollection->removePainterOperations(); SkSafeUnref(m_drawingCollection); } @@ -93,6 +94,12 @@ void SurfaceCollectionManager::swap() // clear all of the content in the three collections held by the collection manager void SurfaceCollectionManager::clearCollections() { + // remove all painting operations, since they're no longer relevant + if (m_drawingCollection) + m_drawingCollection->removePainterOperations(); + if (m_paintingCollection) + m_paintingCollection->removePainterOperations(); + SkSafeUnref(m_drawingCollection); m_drawingCollection = 0; SkSafeUnref(m_paintingCollection); -- cgit v1.1