From 634f229e4f0075b052e110ba0a89554c46f6c510 Mon Sep 17 00:00:00 2001 From: Nicolas Roard Date: Sat, 19 Feb 2011 01:22:16 -0800 Subject: Do not merge: Cherry-pick Fix ANR in the browser from master Sometimes we were not releasing textures as they were busy; they could still be deleted when swapping the layers trees, and as they were also still present in the LayerTexture Hashmap this was causing an ANR (at best -- the texture was already deallocated, the LayerTexture dtor was then trying to release() them...) bug:3398660 Change-Id: I3b08af94a6a7041d45d373ebaec0ec4ba59dac82 --- WebCore/platform/graphics/android/BaseTile.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'WebCore/platform/graphics/android/BaseTile.cpp') diff --git a/WebCore/platform/graphics/android/BaseTile.cpp b/WebCore/platform/graphics/android/BaseTile.cpp index 2942f24..acb500d 100644 --- a/WebCore/platform/graphics/android/BaseTile.cpp +++ b/WebCore/platform/graphics/android/BaseTile.cpp @@ -107,13 +107,14 @@ void BaseTile::reserveTexture() m_texture = texture; } -void BaseTile::removeTexture(BackedDoubleBufferedTexture* texture) +bool BaseTile::removeTexture(BackedDoubleBufferedTexture* texture) { XLOG("%x removeTexture res: %x... page %x", this, m_texture, m_page); // We update atomically, so paintBitmap() can see the correct value android::AutoMutex lock(m_atomicSync); if (m_texture == texture) m_texture = 0; + return true; } void BaseTile::setScale(float scale) -- cgit v1.1