diff options
author | Ben Wagner <bungeman@google.com> | 2018-04-23 17:23:30 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-04-24 15:26:56 +0000 |
commit | 738a25645d090df803651321ed7bc7a3c0f6e595 (patch) | |
tree | 7423b7190f005a5643dbdeef7b5016bf81f888e5 /src/core/SkCanvas.cpp | |
parent | 6f5e77a08faf9d967eba8194811cbf2391092c23 (diff) |
Properly restore from image filter save layers.
SkCanvas::internalSaveLayer calls internalSetMatrix to smash the matrix.
SkCanvas::internalRestore tried to restore the state by setting just the
matrix on the canvas. However, this misses restoring the matrix on the
top devices. Correct this by making internalRestore mirror
internalSaveLayer and call internalSetMatrix.
Without this change some draw calls will not respect the matrix
correctly when they follow a draw with an image filter.
Change-Id: If2660cd3799c3050604d9d8754b140507ec3f5e1
Reviewed-on: https://skia-review.googlesource.com/123241
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'src/core/SkCanvas.cpp')
-rw-r--r-- | src/core/SkCanvas.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp index 487aa41386..3f2439d538 100644 --- a/src/core/SkCanvas.cpp +++ b/src/core/SkCanvas.cpp @@ -1130,7 +1130,7 @@ void SkCanvas::internalRestore() { layer->fPaint.get(), layer->fClipImage.get(), layer->fClipMatrix); // restore what we smashed in internalSaveLayer - fMCRec->fMatrix = layer->fStashedMatrix; + this->internalSetMatrix(layer->fStashedMatrix); // reset this, since internalDrawDevice will have set it to true delete layer; } else { |