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

Unified Diff: include/gpu/GrEffectStage.h

Issue 553973002: Remove debug-only ref of GrEffectStage (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comment Created 6 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrEffectStage.h
diff --git a/include/gpu/GrEffectStage.h b/include/gpu/GrEffectStage.h
index a3ae9a8c516e55762d4dc2e925767ed6a2df32ad..ba4d95d3371e4b480a633574745b16d71e4cac54 100644
--- a/include/gpu/GrEffectStage.h
+++ b/include/gpu/GrEffectStage.h
@@ -82,10 +82,12 @@ public:
}
class SavedCoordChange {
+ public:
+ SkDEBUGCODE(SavedCoordChange() : fEffectUniqueID(SK_InvalidUniqueID) {})
private:
bool fCoordChangeMatrixSet;
SkMatrix fCoordChangeMatrix;
- SkDEBUGCODE(mutable SkAutoTUnref<const GrEffect> fEffect;)
+ SkDEBUGCODE(mutable uint32_t fEffectUniqueID;)
friend class GrEffectStage;
};
@@ -101,9 +103,8 @@ public:
if (fCoordChangeMatrixSet) {
savedCoordChange->fCoordChangeMatrix = fCoordChangeMatrix;
}
- SkASSERT(NULL == savedCoordChange->fEffect.get());
- SkDEBUGCODE(SkRef(fEffect.get());)
- SkDEBUGCODE(savedCoordChange->fEffect.reset(fEffect.get());)
+ SkASSERT(SK_InvalidUniqueID == savedCoordChange->fEffectUniqueID);
+ SkDEBUGCODE(savedCoordChange->fEffectUniqueID = fEffect->getUniqueID();)
}
/**
@@ -114,8 +115,8 @@ public:
if (fCoordChangeMatrixSet) {
fCoordChangeMatrix = savedCoordChange.fCoordChangeMatrix;
}
- SkASSERT(savedCoordChange.fEffect.get() == fEffect);
- SkDEBUGCODE(savedCoordChange.fEffect.reset(NULL);)
+ SkASSERT(savedCoordChange.fEffectUniqueID == fEffect->getUniqueID());
+ SkDEBUGCODE(savedCoordChange.fEffectUniqueID = SK_InvalidUniqueID);
}
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698