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

Unified Diff: src/core/SkPictureContentInfo.cpp

Issue 452673003: Revert of Add layer counting to SkPictureRecord (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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/core/SkPictureContentInfo.h ('k') | src/core/SkPictureData.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPictureContentInfo.cpp
diff --git a/src/core/SkPictureContentInfo.cpp b/src/core/SkPictureContentInfo.cpp
index 1d19f352f4adf806527e6c4fbe33f38a2f19339c..8185d850b8d9b0b81f1c97a2dfe7d4819ab21663 100644
--- a/src/core/SkPictureContentInfo.cpp
+++ b/src/core/SkPictureContentInfo.cpp
@@ -71,62 +71,6 @@
}
}
-void SkPictureContentInfo::onSaveLayer() {
- *fSaveStack.append() = kSaveLayer_Flag;
-}
-
-void SkPictureContentInfo::onSave() {
- *fSaveStack.append() = kSave_Flag;
-}
-
-void SkPictureContentInfo::onRestore() {
- SkASSERT(fSaveStack.count() > 0);
-
- bool containedSaveLayer = fSaveStack.top() & kContainedSaveLayer_Flag;
-
- if (fSaveStack.top() & kSaveLayer_Flag) {
- ++fNumLayers;
- if (containedSaveLayer) {
- ++fNumInteriorLayers;
- } else {
- ++fNumLeafLayers;
- }
- containedSaveLayer = true;
- }
-
- fSaveStack.pop();
-
- if (containedSaveLayer && fSaveStack.count() > 0) {
- fSaveStack.top() |= kContainedSaveLayer_Flag;
- }
-}
-
-void SkPictureContentInfo::rescindLastSave() {
- SkASSERT(fSaveStack.count() > 0);
- SkASSERT(fSaveStack.top() & kSave_Flag);
-
- bool containedSaveLayer = fSaveStack.top() & kContainedSaveLayer_Flag;
-
- fSaveStack.pop();
-
- if (containedSaveLayer && fSaveStack.count() > 0) {
- fSaveStack.top() |= kContainedSaveLayer_Flag;
- }
-}
-
-void SkPictureContentInfo::rescindLastSaveLayer() {
- SkASSERT(fSaveStack.count() > 0);
- SkASSERT(fSaveStack.top() & kSaveLayer_Flag);
-
- bool containedSaveLayer = fSaveStack.top() & kContainedSaveLayer_Flag;
-
- fSaveStack.pop();
-
- if (containedSaveLayer && fSaveStack.count() > 0) {
- fSaveStack.top() |= kContainedSaveLayer_Flag;
- }
-}
-
void SkPictureContentInfo::set(const SkPictureContentInfo& src) {
fNumOperations = src.fNumOperations;
fNumTexts = src.fNumTexts;
@@ -134,10 +78,6 @@
fNumFastPathDashEffects = src.fNumFastPathDashEffects;
fNumAAConcavePaths = src.fNumAAConcavePaths;
fNumAAHairlineConcavePaths = src.fNumAAHairlineConcavePaths;
- fNumLayers = src.fNumLayers;
- fNumInteriorLayers = src.fNumInteriorLayers;
- fNumLeafLayers = src.fNumLeafLayers;
- fSaveStack = src.fSaveStack;
}
void SkPictureContentInfo::reset() {
@@ -147,10 +87,6 @@
fNumFastPathDashEffects = 0;
fNumAAConcavePaths = 0;
fNumAAHairlineConcavePaths = 0;
- fNumLayers = 0;
- fNumInteriorLayers = 0;
- fNumLeafLayers = 0;
- fSaveStack.rewind();
}
void SkPictureContentInfo::swap(SkPictureContentInfo* other) {
@@ -160,8 +96,4 @@
SkTSwap(fNumFastPathDashEffects, other->fNumFastPathDashEffects);
SkTSwap(fNumAAConcavePaths, other->fNumAAConcavePaths);
SkTSwap(fNumAAHairlineConcavePaths, other->fNumAAHairlineConcavePaths);
- SkTSwap(fNumLayers, other->fNumLayers);
- SkTSwap(fNumInteriorLayers, other->fNumInteriorLayers);
- SkTSwap(fNumLeafLayers, other->fNumLeafLayers);
- fSaveStack.swap(other->fSaveStack);
}
« no previous file with comments | « src/core/SkPictureContentInfo.h ('k') | src/core/SkPictureData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698