diff options
-rw-r--r-- | WebCore/platform/graphics/android/BaseLayerAndroid.cpp | 13 | ||||
-rw-r--r-- | WebCore/platform/graphics/android/GLWebViewState.h | 3 |
2 files changed, 16 insertions, 0 deletions
diff --git a/WebCore/platform/graphics/android/BaseLayerAndroid.cpp b/WebCore/platform/graphics/android/BaseLayerAndroid.cpp index 0bb2928..3719c35 100644 --- a/WebCore/platform/graphics/android/BaseLayerAndroid.cpp +++ b/WebCore/platform/graphics/android/BaseLayerAndroid.cpp @@ -63,6 +63,9 @@ int BaseLayerAndroid::count() #endif BaseLayerAndroid::BaseLayerAndroid() +#if USE(ACCELERATED_COMPOSITING) + : m_glWebViewState(0) +#endif { #ifdef DEBUG_COUNT gBaseLayerAndroidCount++; @@ -79,7 +82,17 @@ BaseLayerAndroid::~BaseLayerAndroid() void BaseLayerAndroid::setContent(const PictureSet& src) { +#if USE(ACCELERATED_COMPOSITING) + if (m_glWebViewState) { + m_glWebViewState->baseLayerLock(); + m_content.set(src); + m_glWebViewState->baseLayerUnlock(); + } else { + m_content.set(src); + } +#else m_content.set(src); +#endif } #if USE(ACCELERATED_COMPOSITING) diff --git a/WebCore/platform/graphics/android/GLWebViewState.h b/WebCore/platform/graphics/android/GLWebViewState.h index ac3943e..4cbbdc0 100644 --- a/WebCore/platform/graphics/android/GLWebViewState.h +++ b/WebCore/platform/graphics/android/GLWebViewState.h @@ -175,6 +175,9 @@ public: unsigned int currentPictureCounter() const { return m_currentPictureCounter; } SkRect& invalidatedRect() { return m_invalidatedRect; } + void baseLayerLock() { m_baseLayerLock.lock(); } + void baseLayerUnlock() { m_baseLayerLock.unlock(); } + private: // Delay between scheduling a new page when the scale |