diff options
author | Nicolas Roard <nicolas@android.com> | 2011-01-26 14:46:30 -0800 |
---|---|---|
committer | Nicolas Roard <nicolas@android.com> | 2011-01-26 14:46:30 -0800 |
commit | 4c0f1a51d7d3b51a1f241aa700f9ed5b3b23998c (patch) | |
tree | b43179d9105c4e5e6c968662f99eb0e5fa48b1e6 /WebCore/platform/graphics/android/TilesManager.cpp | |
parent | ed03e47015ce173c535ea9da8b61548db718e80e (diff) | |
download | external_webkit-4c0f1a51d7d3b51a1f241aa700f9ed5b3b23998c.zip external_webkit-4c0f1a51d7d3b51a1f241aa700f9ed5b3b23998c.tar.gz external_webkit-4c0f1a51d7d3b51a1f241aa700f9ed5b3b23998c.tar.bz2 |
Fix the flickering bug. We return any previous textures used by the
layer until we get the new one ready.
bug:3391157 bug:3393571
Change-Id: I81dce23f79be788c3c0bfb0ccfd54d08156dfe3f
Diffstat (limited to 'WebCore/platform/graphics/android/TilesManager.cpp')
-rw-r--r-- | WebCore/platform/graphics/android/TilesManager.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/WebCore/platform/graphics/android/TilesManager.cpp b/WebCore/platform/graphics/android/TilesManager.cpp index 1655016..16282c4 100644 --- a/WebCore/platform/graphics/android/TilesManager.cpp +++ b/WebCore/platform/graphics/android/TilesManager.cpp @@ -80,7 +80,7 @@ TilesManager::TilesManager() m_textures.append(reinterpret_cast<BackedDoubleBufferedTexture*>( android_atomic_acquire_load(reinterpret_cast<int32_t*>(&texture)))); } - XLOG("TilesManager ctor"); + XLOG("TilesManager ctor - init textures done"); m_pixmapsGenerationThread = new TexturesGenerator(); m_pixmapsGenerationThread->run("TexturesGenerator"); @@ -232,7 +232,8 @@ BackedDoubleBufferedTexture* TilesManager::getAvailableTexture(BaseTile* owner) LayerTexture* TilesManager::getExistingTextureForLayer(LayerAndroid* layer, const IntRect& rect, - bool any) + bool any, + LayerTexture* texture) { android::Mutex::Autolock lock(m_texturesLock); for (unsigned int i = 0; i< m_layersTextures.size(); i++) { @@ -242,6 +243,8 @@ LayerTexture* TilesManager::getExistingTextureForLayer(LayerAndroid* layer, continue; if (!any && layer->getScale() != m_layersTextures[i]->scale()) continue; + if (any && texture == m_layersTextures[i]) + continue; XLOG("return layer %d (%x) for tile %d (%x)", i, m_layersTextures[i], |