diff options
author | Nicolas Roard <nicolasroard@google.com> | 2012-05-12 17:12:36 -0700 |
---|---|---|
committer | Nicolas Roard <nicolasroard@google.com> | 2012-05-18 19:40:01 -0700 |
commit | 6baa213e1806af132b1f0b1170343c5ac2bf75d3 (patch) | |
tree | 69be21336fb942f1b9d8660e40c927acf5e22caf /Source/WebCore/platform/graphics/android/layers | |
parent | 8156b6674402608e0304803380ef0e5e2845588d (diff) | |
download | external_webkit-6baa213e1806af132b1f0b1170343c5ac2bf75d3.zip external_webkit-6baa213e1806af132b1f0b1170343c5ac2bf75d3.tar.gz external_webkit-6baa213e1806af132b1f0b1170343c5ac2bf75d3.tar.bz2 |
Fix memory leak and repaint issues with fixed background elements
bug:6522485 bug:6486951
Change-Id: Ia707efed9311e4352eed3ab005ec7ca93b8444e4
Diffstat (limited to 'Source/WebCore/platform/graphics/android/layers')
-rw-r--r-- | Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.cpp | 3 | ||||
-rw-r--r-- | Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.cpp b/Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.cpp index a0a1b58..283fa58 100644 --- a/Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.cpp +++ b/Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.cpp @@ -244,6 +244,9 @@ Image* FixedBackgroundImageLayerAndroid::GetCachedImage(PassRefPtr<RenderStyle> Image* image = cachedImage->image(); + if (image && !image->nativeImageForCurrentFrame()) + return 0; + if (image == Image::nullImage()) return 0; diff --git a/Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp b/Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp index 95e6825..6e88081 100644 --- a/Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp +++ b/Source/WebCore/platform/graphics/android/layers/LayerAndroid.cpp @@ -601,7 +601,7 @@ void LayerAndroid::showLayer(int indent) int count = this->countChildren(); for (int i = 0; i < count; i++) - this->getChild(i)->showLayer(indent + 1); + this->getChild(i)->showLayer(indent + 2); } void LayerAndroid::mergeInvalsInto(LayerAndroid* replacementTree) |