summaryrefslogtreecommitdiffstats
path: root/WebCore
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore')
-rw-r--r--WebCore/platform/graphics/android/BaseTile.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/WebCore/platform/graphics/android/BaseTile.cpp b/WebCore/platform/graphics/android/BaseTile.cpp
index 5701486..789cbe0 100644
--- a/WebCore/platform/graphics/android/BaseTile.cpp
+++ b/WebCore/platform/graphics/android/BaseTile.cpp
@@ -168,8 +168,12 @@ void BaseTile::draw(float transparency, SkRect& rect)
}
// Early return if set to un-usable in purpose!
- if (!m_usable) {
- XLOG("early return at BaseTile::draw b/c tile set to unusable !");
+ m_atomicSync.lock();
+ bool usable = m_usable;
+ bool isTexturePainted = m_lastPaintedPicture;
+ m_atomicSync.unlock();
+ if (!usable || !isTexturePainted) {
+ XLOG("early return at BaseTile::draw b/c tile set to unusable or not painted !");
return;
}
@@ -180,13 +184,8 @@ void BaseTile::draw(float transparency, SkRect& rect)
return;
}
- m_atomicSync.lock();
- bool isTexturePainted = m_lastPaintedPicture;
- m_atomicSync.unlock();
-
- if (isTexturePainted)
- TilesManager::instance()->shader()->drawQuad(rect, textureInfo->m_textureId,
- transparency);
+ TilesManager::instance()->shader()->drawQuad(rect, textureInfo->m_textureId,
+ transparency);
m_texture->consumerRelease();
}