summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/graphics')
-rw-r--r--WebCore/platform/graphics/android/GLWebViewState.cpp8
-rw-r--r--WebCore/platform/graphics/android/GLWebViewState.h3
2 files changed, 8 insertions, 3 deletions
diff --git a/WebCore/platform/graphics/android/GLWebViewState.cpp b/WebCore/platform/graphics/android/GLWebViewState.cpp
index 1c32848..45915e5 100644
--- a/WebCore/platform/graphics/android/GLWebViewState.cpp
+++ b/WebCore/platform/graphics/android/GLWebViewState.cpp
@@ -63,7 +63,7 @@ int GLWebViewState::count()
}
#endif
-GLWebViewState::GLWebViewState()
+GLWebViewState::GLWebViewState(android::Mutex* buttonMutex)
: m_scaleRequestState(kNoScaleRequest)
, m_currentScale(1)
, m_futureScale(1)
@@ -72,6 +72,7 @@ GLWebViewState::GLWebViewState()
, m_baseLayer(0)
, m_currentPictureCounter(0)
, m_usePageA(true)
+ , m_globalButtonMutex(buttonMutex)
{
m_viewport.setEmpty();
m_futureViewportTileBounds.setEmpty();
@@ -135,8 +136,11 @@ void GLWebViewState::inval(const IntRect& rect)
unsigned int GLWebViewState::paintBaseLayerContent(SkCanvas* canvas)
{
android::Mutex::Autolock lock(m_baseLayerLock);
- if (m_baseLayer)
+ if (m_baseLayer) {
+ m_globalButtonMutex->lock();
m_baseLayer->drawCanvas(canvas);
+ m_globalButtonMutex->unlock();
+ }
return m_currentPictureCounter;
}
diff --git a/WebCore/platform/graphics/android/GLWebViewState.h b/WebCore/platform/graphics/android/GLWebViewState.h
index c627a6e..8d2216e 100644
--- a/WebCore/platform/graphics/android/GLWebViewState.h
+++ b/WebCore/platform/graphics/android/GLWebViewState.h
@@ -152,7 +152,7 @@ public:
};
typedef int32_t GLScaleState;
- GLWebViewState();
+ GLWebViewState(android::Mutex* globalButtonMutex);
~GLWebViewState();
GLScaleState scaleRequestState() const { return m_scaleRequestState; }
void setScaleRequestState(GLScaleState state) { m_scaleRequestState = state; }
@@ -222,6 +222,7 @@ private:
TiledPage* m_tiledPageA;
TiledPage* m_tiledPageB;
SkIRect m_lastInval;
+ android::Mutex* m_globalButtonMutex;
};
} // namespace WebCore