summaryrefslogtreecommitdiffstats
path: root/WebCore
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore')
-rw-r--r--WebCore/platform/graphics/android/TexturesGenerator.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/WebCore/platform/graphics/android/TexturesGenerator.cpp b/WebCore/platform/graphics/android/TexturesGenerator.cpp
index 193ca46..0c385b8 100644
--- a/WebCore/platform/graphics/android/TexturesGenerator.cpp
+++ b/WebCore/platform/graphics/android/TexturesGenerator.cpp
@@ -115,11 +115,19 @@ status_t TexturesGenerator::readyToRun()
bool TexturesGenerator::threadLoop()
{
- XLOG("threadLoop, waiting for signal");
- m_newRequestLock.lock();
- m_newRequestCond.wait(m_newRequestLock);
- m_newRequestLock.unlock();
- XLOG("threadLoop, got signal");
+ mRequestedPixmapsLock.lock();
+
+ if (!mRequestedPixmaps.size()) {
+ XLOG("threadLoop, waiting for signal");
+ m_newRequestLock.lock();
+ mRequestedPixmapsLock.unlock();
+ m_newRequestCond.wait(m_newRequestLock);
+ m_newRequestLock.unlock();
+ XLOG("threadLoop, got signal");
+ } else {
+ XLOG("threadLoop going as we already have something in the queue");
+ mRequestedPixmapsLock.unlock();
+ }
m_currentSet = 0;
bool stop = false;