| Index: src/core/SkCanvas.cpp
|
| diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
|
| index ac909def6a662f8445c456a2bf4527395567c1d2..8426f090ec5949653ab516ffca3f7d33a317c338 100644
|
| --- a/src/core/SkCanvas.cpp
|
| +++ b/src/core/SkCanvas.cpp
|
| @@ -795,6 +795,7 @@
|
| if (fMCStack.count() > 1) {
|
| this->willRestore();
|
| SkASSERT(fSaveCount > 1);
|
| + fSaveCount -= 1;
|
| this->internalRestore();
|
| this->didRestore();
|
| }
|
| @@ -878,6 +879,7 @@
|
| bounds = NULL;
|
| }
|
| SaveLayerStrategy strategy = this->willSaveLayer(bounds, paint, kARGB_ClipLayer_SaveFlag);
|
| + fSaveCount += 1;
|
| this->internalSaveLayer(bounds, paint, kARGB_ClipLayer_SaveFlag, strategy);
|
| return this->getSaveCount() - 1;
|
| }
|
| @@ -887,6 +889,7 @@
|
| bounds = NULL;
|
| }
|
| SaveLayerStrategy strategy = this->willSaveLayer(bounds, paint, flags);
|
| + fSaveCount += 1;
|
| this->internalSaveLayer(bounds, paint, flags, strategy);
|
| return this->getSaveCount() - 1;
|
| }
|
| @@ -896,8 +899,6 @@
|
| #ifndef SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG
|
| flags |= kClipToLayer_SaveFlag;
|
| #endif
|
| -
|
| - fSaveCount += 1;
|
|
|
| // do this before we create the layer. We don't call the public save() since
|
| // that would invoke a possibly overridden virtual
|
| @@ -976,8 +977,6 @@
|
|
|
| void SkCanvas::internalRestore() {
|
| SkASSERT(fMCStack.count() != 0);
|
| -
|
| - fSaveCount -= 1;
|
|
|
| fDeviceCMDirty = true;
|
| fCachedLocalClipBoundsDirty = true;
|
|
|