summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android/BaseTileTexture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/platform/graphics/android/BaseTileTexture.cpp')
-rw-r--r--Source/WebCore/platform/graphics/android/BaseTileTexture.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/Source/WebCore/platform/graphics/android/BaseTileTexture.cpp b/Source/WebCore/platform/graphics/android/BaseTileTexture.cpp
index 5b7acdb..caaf116 100644
--- a/Source/WebCore/platform/graphics/android/BaseTileTexture.cpp
+++ b/Source/WebCore/platform/graphics/android/BaseTileTexture.cpp
@@ -91,7 +91,11 @@ void BaseTileTexture::discardGLTexture()
if (m_ownTextureId)
GLUtils::deleteTexture(&m_ownTextureId);
- releaseAndRemoveFromTile();
+ if (m_owner) {
+ // clear both Tile->Texture and Texture->Tile links
+ m_owner->removeTexture(this);
+ release(m_owner);
+ }
}
void BaseTileTexture::destroyTextures(SharedTexture** textures)
@@ -209,16 +213,6 @@ bool BaseTileTexture::release(TextureOwner* owner)
return true;
}
-void BaseTileTexture::releaseAndRemoveFromTile()
-{
- // NOTE: only call on UI thread, so m_owner won't be changing
- if (m_owner) {
- // clear both Tile->Texture and Texture->Tile links
- m_owner->removeTexture(this);
- release(m_owner);
- }
-}
-
void BaseTileTexture::setTile(TextureInfo* info, int x, int y,
float scale, TilePainter* painter,
unsigned int pictureCount)