summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2012-07-23 13:48:00 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-07-23 13:48:01 -0700
commita6d1f58c04ea1017b0d6fb6cbc74eb1469631e16 (patch)
tree66a15739dfb1eb6a90e43df34bdd58bd507f1a5e /Source
parent1e9a22deff8a694c515ca82bd9f139be6d06be4d (diff)
parent20ed54e0d613ead8237af598d8e8e1f5ea3f8b82 (diff)
downloadexternal_webkit-a6d1f58c04ea1017b0d6fb6cbc74eb1469631e16.zip
external_webkit-a6d1f58c04ea1017b0d6fb6cbc74eb1469631e16.tar.gz
external_webkit-a6d1f58c04ea1017b0d6fb6cbc74eb1469631e16.tar.bz2
Merge "Don't attach empty PicturePile content to layer"
Diffstat (limited to 'Source')
-rw-r--r--Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp b/Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp
index 2807163..25441f4 100644
--- a/Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp
+++ b/Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp
@@ -852,8 +852,9 @@ bool GraphicsLayerAndroid::paintContext(LayerAndroid* layer,
// TODO: add content checks (text, opacity, etc.)
picture.updatePicturesIfNeeded(this);
+ // store the newly painted content in the layer if it's not empty
PicturePileLayerContent* content = new PicturePileLayerContent(picture);
- layer->setContent(content);
+ layer->setContent(content->isEmpty() ? 0 : content);
SkSafeUnref(content);
return true;