diff options
author | Teng-Hui Zhu <ztenghui@google.com> | 2010-12-10 14:26:26 -0800 |
---|---|---|
committer | Teng-Hui Zhu <ztenghui@google.com> | 2010-12-13 11:04:58 -0800 |
commit | c9ab9bf00ba3ce8289f917675f81b40e4438a864 (patch) | |
tree | 0250b0a08f85f41ad768734f0d716753d279ce3a /WebCore/platform/graphics/android/GLWebViewState.cpp | |
parent | 57447b53a088f0e3b0ee75ef043db7224aac25ae (diff) | |
download | external_webkit-c9ab9bf00ba3ce8289f917675f81b40e4438a864.zip external_webkit-c9ab9bf00ba3ce8289f917675f81b40e4438a864.tar.gz external_webkit-c9ab9bf00ba3ce8289f917675f81b40e4438a864.tar.bz2 |
Prevent the usage of the texture(tile) if considered un-usable
As an example of gmail, even though clearView is called, the previous
content still show up.
This fix just use a usable flag to make sure the content
in the previously used texture is not showing up.
bug : 3215000
Change-Id: I5429a4d03547d4cd4ad10bd2153c247a4d40db7d
Diffstat (limited to 'WebCore/platform/graphics/android/GLWebViewState.cpp')
-rw-r--r-- | WebCore/platform/graphics/android/GLWebViewState.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/WebCore/platform/graphics/android/GLWebViewState.cpp b/WebCore/platform/graphics/android/GLWebViewState.cpp index 9bca91a..7c2f851 100644 --- a/WebCore/platform/graphics/android/GLWebViewState.cpp +++ b/WebCore/platform/graphics/android/GLWebViewState.cpp @@ -97,6 +97,10 @@ GLWebViewState::~GLWebViewState() void GLWebViewState::setBaseLayer(BaseLayerAndroid* layer, const IntRect& rect) { android::Mutex::Autolock lock(m_baseLayerLock); + if (!layer) { + m_tiledPageA->setUsable(false); + m_tiledPageB->setUsable(false); + } if (m_baseLayer && layer) m_baseLayer->swapExtra(layer); m_baseLayer = layer; @@ -233,7 +237,8 @@ void GLWebViewState::setViewport(SkRect& viewport, float scale) static_cast<int>(ceilf(viewport.fBottom * invTileContentHeight))); } -bool GLWebViewState::hasContent() { +bool GLWebViewState::hasContent() +{ android::Mutex::Autolock lock(m_baseLayerLock); return m_baseLayer; } |