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

Unified Diff: include/gpu/GrGpuResource.h

Issue 638003003: Remove ~GrIORef since last remaining virtual and now all inline (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 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 | src/gpu/GrGpuResource.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrGpuResource.h
diff --git a/include/gpu/GrGpuResource.h b/include/gpu/GrGpuResource.h
index afd9275d472fc447dd38650dd89cca95a918baa1..c63906281e8a5f3982ad0f6e469b21a73bbd7a03 100644
--- a/include/gpu/GrGpuResource.h
+++ b/include/gpu/GrGpuResource.h
@@ -41,7 +41,14 @@ class GrContext;
template <typename DERIVED> class GrIORef : public SkNoncopyable {
public:
SK_DECLARE_INST_COUNT_ROOT(GrIORef)
- virtual ~GrIORef();
+
+ virtual ~GrIORef() {
mtklein 2014/10/08 17:57:14 Drop this virtual? Seems like you don't have any
bsalomon 2014/10/08 18:01:53 Good point, will remove the virtual
+ SkASSERT(0 == fRefCnt);
+ SkASSERT(0 == fPendingReads);
+ SkASSERT(0 == fPendingWrites);
+ // Set to invalid values.
+ SkDEBUGCODE(fRefCnt = fPendingReads = fPendingWrites = -10;)
+ }
// Some of the signatures are written to mirror SkRefCnt so that GrGpuResource can work with
// templated helper classes (e.g. SkAutoTUnref). However, we have different categories of
« no previous file with comments | « no previous file | src/gpu/GrGpuResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698