diff options
author | Nicolas Roard <nicolas@android.com> | 2010-11-04 21:14:41 -0700 |
---|---|---|
committer | Nicolas Roard <nicolas@android.com> | 2010-11-05 11:57:15 -0700 |
commit | 32ccb9477579647ebaa1cf4489cd3846ad99c82a (patch) | |
tree | d27afa90e88911c47ddbac70a30dbeb8af8b9562 /WebCore | |
parent | a1e806ed3b2d9e2727d08cc2a3958fce501f6f33 (diff) | |
download | external_webkit-32ccb9477579647ebaa1cf4489cd3846ad99c82a.zip external_webkit-32ccb9477579647ebaa1cf4489cd3846ad99c82a.tar.gz external_webkit-32ccb9477579647ebaa1cf4489cd3846ad99c82a.tar.bz2 |
Fix the blank screen bug.
As the texture generator thread isn't an infinite loop, we could miss
a signaled new request.
Bug:3155078
Change-Id: Ifad1ec356b061eec24399cad4b572866f6d74f06
Diffstat (limited to 'WebCore')
-rw-r--r-- | WebCore/platform/graphics/android/TexturesGenerator.cpp | 18 |
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; |