diff options
author | Nicolas Roard <nicolasroard@google.com> | 2011-11-07 18:26:32 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-11-07 18:26:32 +0000 |
commit | 557336db0d2cffe6f0e9213da1cb34676a02f178 (patch) | |
tree | df371a5dad6be80ec50787edd984acc41738ea89 /Source/WebCore/platform | |
parent | 9f8abceb57acf52a8058db198a86e96d4b82962e (diff) | |
parent | 54464c408c893079c1486aec03329f1de8ec6a29 (diff) | |
download | external_webkit-557336db0d2cffe6f0e9213da1cb34676a02f178.zip external_webkit-557336db0d2cffe6f0e9213da1cb34676a02f178.tar.gz external_webkit-557336db0d2cffe6f0e9213da1cb34676a02f178.tar.bz2 |
am 54464c40: Merge "Doesn\'t lock the entire drawing..." into ics-mr1
* commit '54464c408c893079c1486aec03329f1de8ec6a29':
Doesn't lock the entire drawing...
Diffstat (limited to 'Source/WebCore/platform')
3 files changed, 9 insertions, 5 deletions
diff --git a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp index e53a1e1..a1766d0 100644 --- a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp +++ b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp @@ -236,12 +236,16 @@ void GLWebViewState::inval(const IntRect& rect) unsigned int GLWebViewState::paintBaseLayerContent(SkCanvas* canvas) { - android::Mutex::Autolock lock(m_baseLayerLock); - if (m_paintingBaseLayer) { + m_baseLayerLock.lock(); + BaseLayerAndroid* base = m_paintingBaseLayer; + SkSafeRef(base); + m_baseLayerLock.unlock(); + if (base) { m_globalButtonMutex->lock(); - m_paintingBaseLayer->drawCanvas(canvas); + base->drawCanvas(canvas); m_globalButtonMutex->unlock(); } + SkSafeUnref(base); return m_currentPictureCounter; } diff --git a/Source/WebCore/platform/graphics/android/TexturesGenerator.h b/Source/WebCore/platform/graphics/android/TexturesGenerator.h index 19ab1af..2e3b6b4 100644 --- a/Source/WebCore/platform/graphics/android/TexturesGenerator.h +++ b/Source/WebCore/platform/graphics/android/TexturesGenerator.h @@ -42,7 +42,7 @@ class LayerAndroid; class TexturesGenerator : public Thread { public: - TexturesGenerator() : Thread() + TexturesGenerator() : Thread(false) , m_waitForCompletion(false) , m_currentOperation(0) { } virtual ~TexturesGenerator() { } diff --git a/Source/WebCore/platform/graphics/android/TilesManager.cpp b/Source/WebCore/platform/graphics/android/TilesManager.cpp index dd2b169..d36017f 100644 --- a/Source/WebCore/platform/graphics/android/TilesManager.cpp +++ b/Source/WebCore/platform/graphics/android/TilesManager.cpp @@ -107,7 +107,7 @@ TilesManager::TilesManager() m_tilesTextures.reserveCapacity(MAX_TEXTURE_ALLOCATION); m_availableTilesTextures.reserveCapacity(MAX_TEXTURE_ALLOCATION); m_pixmapsGenerationThread = new TexturesGenerator(); - m_pixmapsGenerationThread->run("TexturesGenerator"); + m_pixmapsGenerationThread->run("TexturesGenerator", android::PRIORITY_BACKGROUND); } void TilesManager::allocateTiles() |