From 4c0f1a51d7d3b51a1f241aa700f9ed5b3b23998c Mon Sep 17 00:00:00 2001 From: Nicolas Roard Date: Wed, 26 Jan 2011 14:46:30 -0800 Subject: 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 --- WebCore/platform/graphics/android/TilesManager.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'WebCore/platform/graphics/android/TilesManager.cpp') 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( android_atomic_acquire_load(reinterpret_cast(&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], -- cgit v1.1