Index: src/core/SkCanvas.cpp |
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp |
index 0bd9eb357944bf4de88f101f68382cbf68ecab07..514a45460c23c82c35073686cfd15a522a188514 100644 |
--- a/src/core/SkCanvas.cpp |
+++ b/src/core/SkCanvas.cpp |
@@ -801,7 +801,6 @@ void SkCanvas::updateDeviceCMCache() { |
void SkCanvas::checkForDeferredSave() { |
if (fMCRec->fDeferredSaveCount > 0) { |
- fMCRec->fDeferredSaveCount -= 1; |
this->doSave(); |
} |
} |
@@ -830,6 +829,9 @@ int SkCanvas::save() { |
void SkCanvas::doSave() { |
this->willSave(); |
+ |
+ SkASSERT(fMCRec->fDeferredSaveCount > 0); |
+ fMCRec->fDeferredSaveCount -= 1; |
this->internalSave(); |
} |