summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android/nav
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2012-05-30 12:38:52 -0700
committerChris Craik <ccraik@google.com>2012-05-30 12:58:32 -0700
commit90ef829b3ebc2caca06ffb46dd587cca71456480 (patch)
tree32a1e5d947cd83ddb577c02820d9b045046661a6 /Source/WebKit/android/nav
parent86ba073431c8ddf2e9d1f2d5d4f89157dd32ec33 (diff)
downloadexternal_webkit-90ef829b3ebc2caca06ffb46dd587cca71456480.zip
external_webkit-90ef829b3ebc2caca06ffb46dd587cca71456480.tar.gz
external_webkit-90ef829b3ebc2caca06ffb46dd587cca71456480.tar.bz2
Draw entire layer tree in capturePicture()
Also fixes matrix initialization in BaseLayerAndroid::getLocalTransform() bug:6389297 Change-Id: I6a3df3de129aa263986c5082614d8d76bc7408f7
Diffstat (limited to 'Source/WebKit/android/nav')
-rw-r--r--Source/WebKit/android/nav/WebView.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/Source/WebKit/android/nav/WebView.cpp b/Source/WebKit/android/nav/WebView.cpp
index ad69042..6c8a251 100644
--- a/Source/WebKit/android/nav/WebView.cpp
+++ b/Source/WebKit/android/nav/WebView.cpp
@@ -525,8 +525,16 @@ void copyBaseContentToPicture(SkPicture* picture)
if (!m_baseLayer || !m_baseLayer->content())
return;
LayerContent* content = m_baseLayer->content();
- content->draw(picture->beginRecording(content->width(), content->height(),
- SkPicture::kUsePathBoundsForClip_RecordingFlag));
+ SkCanvas* canvas = picture->beginRecording(content->width(), content->height(),
+ SkPicture::kUsePathBoundsForClip_RecordingFlag);
+
+ // clear the BaseLayerAndroid's previous matrix (set at each draw)
+ SkMatrix baseMatrix;
+ baseMatrix.reset();
+ m_baseLayer->setMatrix(baseMatrix);
+
+ m_baseLayer->draw(canvas, 0);
+
picture->endRecording();
}