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

Unified Diff: src/core/SkCanvas.cpp

Issue 1037653004: Revert of Make the canvas draw looper setup update the canvas save count (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 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 | « gyp/tests.gypi ('k') | tests/DrawLooperTest.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 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;
« no previous file with comments | « gyp/tests.gypi ('k') | tests/DrawLooperTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698