Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Unified Diff: src/core/SkCanvas.cpp

Issue 241453003: Reduce internal explicit SaveFlags usage. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Re-added needed save flag in SkPictureStateTree::Iterator::draw() Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/animator/SkDrawSaveLayer.cpp ('k') | src/core/SkPictureRecord.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkCanvas.cpp
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index c1d2726d8c3a9b5ffc853a3adfc27a924758422d..665d60f898e44c0920c424b06921aabea35b8891 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -1609,12 +1609,13 @@ void SkCanvas::updateClipConservativelyUsingBounds(const SkRect& bounds, SkRegio
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:
« no previous file with comments | « src/animator/SkDrawSaveLayer.cpp ('k') | src/core/SkPictureRecord.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698