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>
This commit is contained in:
parent
6f5e77a08f
commit
738a25645d
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user