summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/android/BaseTile.cpp
diff options
context:
space:
mode:
authorNicolas Roard <nicolas@android.com>2011-02-19 01:22:16 -0800
committerNicolas Roard <nicolas@android.com>2011-02-19 01:22:16 -0800
commit634f229e4f0075b052e110ba0a89554c46f6c510 (patch)
tree92adb1a4ed784d558fe7b934f14580d5a5b8fc2c /WebCore/platform/graphics/android/BaseTile.cpp
parent928bc35505a3fa29f1598842d49124c06703f972 (diff)
downloadexternal_webkit-634f229e4f0075b052e110ba0a89554c46f6c510.zip
external_webkit-634f229e4f0075b052e110ba0a89554c46f6c510.tar.gz
external_webkit-634f229e4f0075b052e110ba0a89554c46f6c510.tar.bz2
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
Diffstat (limited to 'WebCore/platform/graphics/android/BaseTile.cpp')
-rw-r--r--WebCore/platform/graphics/android/BaseTile.cpp3
1 files changed, 2 insertions, 1 deletions
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)