summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2012-07-23 11:29:08 -0700
committerChris Craik <ccraik@google.com>2012-07-23 11:53:04 -0700
commit20ed54e0d613ead8237af598d8e8e1f5ea3f8b82 (patch)
tree88c88149fc218a6bc93ec6440f73bb038bf7ccca /Source/WebCore/platform
parentf762138fb2c8ec33fe3dec8e6bfd47e459f8f6c8 (diff)
downloadexternal_webkit-20ed54e0d613ead8237af598d8e8e1f5ea3f8b82.zip
external_webkit-20ed54e0d613ead8237af598d8e8e1f5ea3f8b82.tar.gz
external_webkit-20ed54e0d613ead8237af598d8e8e1f5ea3f8b82.tar.bz2
Don't attach empty PicturePile content to layer
This fixes a frequent warning that was occurring due to empty-content layers being painted in merged layers: "Warning: painting PicturePile without content!" Change-Id: I71dbc3cdf1adbbcdd15c833add753cdd06cfcd4f
Diffstat (limited to 'Source/WebCore/platform')
-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;