Reduce internal explicit SaveFlags usage.
Most of these are either redundant/defaults or (hopefully)
unnecessarily specific.
R=reed@google.com, robertphillips@google.com
Author: fmalita@chromium.org
Review URL: https://codereview.chromium.org/241453003
git-svn-id: http://skia.googlecode.com/svn/trunk@14253 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index 569e9e5..c57ae9a 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -1631,12 +1631,13 @@
SkIRect deviceIBounds;
this->getDevice()->getGlobalBounds(&deviceIBounds);
deviceBounds = SkRect::Make(deviceIBounds);
- this->SkCanvas::save(SkCanvas::kMatrix_SaveFlag);
+
// set the clip in device space
+ SkMatrix savedMatrix = this->getTotalMatrix();
this->SkCanvas::setMatrix(SkMatrix::I());
this->SkCanvas::onClipRect(deviceBounds, SkRegion::kReplace_Op,
kHard_ClipEdgeStyle);
- this->SkCanvas::restore(); //pop the matrix, but keep the clip
+ this->setMatrix(savedMatrix);
break;
}
default: