summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2012-05-30 13:27:13 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-05-30 13:27:13 -0700
commit08241ef71160ccc36c2e104ad8c1092dc293a9d3 (patch)
tree4b5beb48cd6877c4bd261e2eba086f9ddae1dea0
parent97a832f0097d2baa671692d428a2897277f9a539 (diff)
parente4d0c1973ec857d1408499010dca9f6856cecdd1 (diff)
downloadexternal_webkit-08241ef71160ccc36c2e104ad8c1092dc293a9d3.zip
external_webkit-08241ef71160ccc36c2e104ad8c1092dc293a9d3.tar.gz
external_webkit-08241ef71160ccc36c2e104ad8c1092dc293a9d3.tar.bz2
am e4d0c197: Merge "Draw entire layer tree in capturePicture()" into jb-dev
* commit 'e4d0c1973ec857d1408499010dca9f6856cecdd1': Draw entire layer tree in capturePicture()
-rw-r--r--Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.cpp1
-rw-r--r--Source/WebKit/android/nav/WebView.cpp12
2 files changed, 11 insertions, 2 deletions
diff --git a/Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.cpp b/Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.cpp
index f03a140..5021c57 100644
--- a/Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.cpp
+++ b/Source/WebCore/platform/graphics/android/layers/BaseLayerAndroid.cpp
@@ -60,6 +60,7 @@ BaseLayerAndroid::BaseLayerAndroid(LayerContent* content)
void BaseLayerAndroid::getLocalTransform(SkMatrix* matrix) const
{
+ matrix->reset();
// base layer doesn't use size in transform calculation
matrix->preConcat(getMatrix());
}
diff --git a/Source/WebKit/android/nav/WebView.cpp b/Source/WebKit/android/nav/WebView.cpp
index 914d605..a277fc3 100644
--- a/Source/WebKit/android/nav/WebView.cpp
+++ b/Source/WebKit/android/nav/WebView.cpp
@@ -528,8 +528,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();
}