summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android/TilesManager.cpp
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2011-10-11 16:08:53 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-10-11 16:08:53 -0700
commit144926737b2b4e6f76f5c6347db3093b8a483e21 (patch)
tree4d67977d39d9ebf847c75554ce42364919d47401 /Source/WebCore/platform/graphics/android/TilesManager.cpp
parent46f244f2351cbaa1a251d79605ed6d7e21d1d53f (diff)
parent93bfc77abb66a95750b747cf5d782c31beadf7cf (diff)
downloadexternal_webkit-144926737b2b4e6f76f5c6347db3093b8a483e21.zip
external_webkit-144926737b2b4e6f76f5c6347db3093b8a483e21.tar.gz
external_webkit-144926737b2b4e6f76f5c6347db3093b8a483e21.tar.bz2
Merge "Fixed infinite redraw loop from running out of layer tiles" into ics-mr0
Diffstat (limited to 'Source/WebCore/platform/graphics/android/TilesManager.cpp')
-rw-r--r--Source/WebCore/platform/graphics/android/TilesManager.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/WebCore/platform/graphics/android/TilesManager.cpp b/Source/WebCore/platform/graphics/android/TilesManager.cpp
index 72c48b2..2d0cc7f 100644
--- a/Source/WebCore/platform/graphics/android/TilesManager.cpp
+++ b/Source/WebCore/platform/graphics/android/TilesManager.cpp
@@ -93,7 +93,7 @@ int TilesManager::getMaxTextureAllocation()
}
TilesManager::TilesManager()
- : m_layersMemoryUsage(0)
+ : m_layerTexturesRemain(true)
, m_maxTextureCount(0)
, m_generatorReady(false)
, m_showVisualIndicator(false)
@@ -237,6 +237,7 @@ void TilesManager::gatherLayerTextures()
{
android::Mutex::Autolock lock(m_texturesLock);
m_availableTilesTextures = m_tilesTextures;
+ m_layerTexturesRemain = true;
}
BaseTileTexture* TilesManager::getAvailableTexture(BaseTile* owner)
@@ -326,6 +327,13 @@ BaseTileTexture* TilesManager::getAvailableTexture(BaseTile* owner)
availableTexturePool->remove(availableTexturePool->find(farthestTexture));
return farthestTexture;
}
+ } else {
+ if (owner->isLayerTile()) {
+ // couldn't find a tile for a layer, layers shouldn't request redraw
+ // TODO: once we do layer prefetching, don't set this for those
+ // tiles
+ m_layerTexturesRemain = false;
+ }
}
XLOG("Couldn't find an available texture for %s tile %x (%d, %d) out of %d available",