aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-02-05 22:36:31 +0000
committerGravatar senorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-02-05 22:36:31 +0000
commit5251e2b91ac976f61e6252d931c1a0e746d2290a (patch)
treee6236589d39a7cfc2e8dbc1f0d5334ba5564c33c /src
parentae761f7545d8ebf181d220169afac2056b057b8c (diff)
Fix a problem with scaled filters in tiled SkPicture playback.
The matrix used during filter application should be up-to-date, so that the filter parameters can be scaled by the CTM (e.g., for hiDPI). However, tiled playback defers setting of the matrix until after the restore() call which draws the filter, which is too late. Moving the setMatrix() ahead of the restore() sequence fixes the problem. TEST=ImageFilterMatrixTest R=junov@chromium.org Review URL: https://codereview.chromium.org/145723007 git-svn-id: http://skia.googlecode.com/svn/trunk@13331 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r--src/core/SkPictureStateTree.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/SkPictureStateTree.cpp b/src/core/SkPictureStateTree.cpp
index 26cc391bfd..89942c71bb 100644
--- a/src/core/SkPictureStateTree.cpp
+++ b/src/core/SkPictureStateTree.cpp
@@ -103,6 +103,7 @@ uint32_t SkPictureStateTree::Iterator::draw() {
SkASSERT(this->isValid());
if (fPlaybackIndex >= fDraws->count()) {
// restore back to where we started
+ fCanvas->setMatrix(fPlaybackMatrix);
if (fCurrentNode->fFlags & Node::kSaveLayer_Flag) { fCanvas->restore(); }
fCurrentNode = fCurrentNode->fParent;
while (NULL != fCurrentNode) {
@@ -110,7 +111,6 @@ uint32_t SkPictureStateTree::Iterator::draw() {
if (fCurrentNode->fFlags & Node::kSaveLayer_Flag) { fCanvas->restore(); }
fCurrentNode = fCurrentNode->fParent;
}
- fCanvas->setMatrix(fPlaybackMatrix);
return kDrawComplete;
}