diff options
Diffstat (limited to 'Source/WebCore/platform/graphics/android/GLWebViewState.cpp')
-rw-r--r-- | Source/WebCore/platform/graphics/android/GLWebViewState.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp index bc582d9..4155461 100644 --- a/Source/WebCore/platform/graphics/android/GLWebViewState.cpp +++ b/Source/WebCore/platform/graphics/android/GLWebViewState.cpp @@ -104,6 +104,9 @@ GLWebViewState::GLWebViewState(android::Mutex* buttonMutex) GLWebViewState::~GLWebViewState() { + // Take care of the transfer queue such that Tex Gen thread will not stuck + TilesManager::instance()->unregisterGLWebViewState(this); + // We have to destroy the two tiled pages first as their destructor // may depend on the existence of this GLWebViewState and some of its // instance variables in order to complete. @@ -121,7 +124,7 @@ GLWebViewState::~GLWebViewState() #ifdef DEBUG_COUNT ClassTracker::instance()->decrement("GLWebViewState"); #endif - TilesManager::instance()->unregisterGLWebViewState(this); + } void GLWebViewState::setBaseLayer(BaseLayerAndroid* layer, const SkRegion& inval, @@ -546,6 +549,11 @@ bool GLWebViewState::drawGL(IntRect& rect, SkRect& viewport, IntRect* invalRect, if (baseForComposited && baseForComposited->countChildren() >= 1) compositedRoot = static_cast<LayerAndroid*>(baseForComposited->getChild(0)); + // Here before we draw, update the BaseTile which has updated content. + // Inside this function, just do GPU blits from the transfer queue into + // the BaseTiles' texture. + TilesManager::instance()->transferQueue()->updateDirtyBaseTiles(); + if (compositedRoot != m_previouslyUsedRoot) { TilesManager::instance()->swapLayersTextures(m_previouslyUsedRoot, compositedRoot); TilesManager::instance()->cleanupTilesTextures(); |