diff options
author | Chris Craik <ccraik@google.com> | 2012-07-23 11:29:08 -0700 |
---|---|---|
committer | Chris Craik <ccraik@google.com> | 2012-07-23 11:53:04 -0700 |
commit | 20ed54e0d613ead8237af598d8e8e1f5ea3f8b82 (patch) | |
tree | 88c88149fc218a6bc93ec6440f73bb038bf7ccca /Source/WebCore | |
parent | f762138fb2c8ec33fe3dec8e6bfd47e459f8f6c8 (diff) | |
download | external_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')
-rw-r--r-- | Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp | 3 |
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; |