summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android/BaseLayerAndroid.cpp
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2011-10-11 14:35:51 -0700
committerChris Craik <ccraik@google.com>2011-10-11 15:41:34 -0700
commit93bfc77abb66a95750b747cf5d782c31beadf7cf (patch)
treeac0b60eb2ca3f88b1bd136d3802852c42cf87c00 /Source/WebCore/platform/graphics/android/BaseLayerAndroid.cpp
parent8242049005e7219ea9846eff8eff3cead8e2461e (diff)
downloadexternal_webkit-93bfc77abb66a95750b747cf5d782c31beadf7cf.zip
external_webkit-93bfc77abb66a95750b747cf5d782c31beadf7cf.tar.gz
external_webkit-93bfc77abb66a95750b747cf5d782c31beadf7cf.tar.bz2
Fixed infinite redraw loop from running out of layer tiles
bug:5349958 Clear a flag when a layer tile can't allocate a texture, and only try and redraw from tile dirtiness if that flag is set. Also, don't ask for redraw if offending tiles are offscreen. Change-Id: Iadb0cb267a9c1f308e5b42a6e0e3b4bc71d18ece
Diffstat (limited to 'Source/WebCore/platform/graphics/android/BaseLayerAndroid.cpp')
-rw-r--r--Source/WebCore/platform/graphics/android/BaseLayerAndroid.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/WebCore/platform/graphics/android/BaseLayerAndroid.cpp b/Source/WebCore/platform/graphics/android/BaseLayerAndroid.cpp
index 94bf045..827c858 100644
--- a/Source/WebCore/platform/graphics/android/BaseLayerAndroid.cpp
+++ b/Source/WebCore/platform/graphics/android/BaseLayerAndroid.cpp
@@ -337,9 +337,13 @@ bool BaseLayerAndroid::drawGL(double currentTime, LayerAndroid* compositedRoot,
TilesManager::instance()->videoLayerManager()->deleteUnusedTextures();
compositedRoot->prepare(m_glWebViewState);
- if (compositedRoot->drawGL(m_glWebViewState, matrix))
- needsRedraw = true;
- else if (!animsRunning)
+ if (compositedRoot->drawGL(m_glWebViewState, matrix)) {
+ if (TilesManager::instance()->layerTexturesRemain()) {
+ // only try redrawing for layers if layer textures remain,
+ // otherwise we'll repaint without getting anything done
+ needsRedraw = true;
+ }
+ } else if (!animsRunning)
m_glWebViewState->resetLayersDirtyArea();
}