summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp
diff options
context:
space:
mode:
authorNicolas Roard <nicolasroard@google.com>2012-07-18 14:58:47 -0700
committerNicolas Roard <nicolasroard@google.com>2012-07-18 16:02:24 -0700
commitcbf95b35591b40a9424e54d765694b378ef11966 (patch)
tree0edad479720c51003f965ea337765fcf872202c2 /Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp
parent3096f2d11f3fb84553c85836b666b08fe4c01d49 (diff)
downloadexternal_webkit-cbf95b35591b40a9424e54d765694b378ef11966.zip
external_webkit-cbf95b35591b40a9424e54d765694b378ef11966.tar.gz
external_webkit-cbf95b35591b40a9424e54d765694b378ef11966.tar.bz2
Fix crashes -- we were resetting a potentially
used PicturePile. bug:6835416 Change-Id: I7b66d9a6b5bea7196181e2a6dfcecef33d4996d0
Diffstat (limited to 'Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp')
-rw-r--r--Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp b/Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp
index 45141e1..2807163 100644
--- a/Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp
+++ b/Source/WebCore/platform/graphics/android/GraphicsLayerAndroid.cpp
@@ -352,7 +352,6 @@ void GraphicsLayerAndroid::setSize(const FloatSize& size)
}
m_contentLayer->setSize(size.width(), size.height());
- m_contentLayer->setContent(0);
setNeedsDisplay();
askForSync();
}
@@ -849,13 +848,14 @@ bool GraphicsLayerAndroid::paintContext(LayerAndroid* layer,
// a new picture every time.
WebCore::PicturePile picture;
picture.setSize(IntSize(m_size.width(), m_size.height()));
- PicturePileLayerContent* content = new PicturePileLayerContent(picture);
- layer->setContent(content);
- SkSafeUnref(content);
// TODO: add content checks (text, opacity, etc.)
picture.updatePicturesIfNeeded(this);
+ PicturePileLayerContent* content = new PicturePileLayerContent(picture);
+ layer->setContent(content);
+ SkSafeUnref(content);
+
return true;
}