plumb SkInstCnt to all subclasses of GrRefCnt
git-svn-id: http://skia.googlecode.com/svn/trunk@4353 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index 6a6b084..f5b44bf 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -36,6 +36,8 @@
class GR_API GrContext : public GrRefCnt {
public:
+ SK_DECLARE_INST_COUNT(GrContext)
+
/**
* Creates a GrContext from within a 3D context.
*/
@@ -787,6 +789,8 @@
// Add an existing texture to the texture cache. This is intended solely
// for use with textures released from an GrAutoScratchTexture.
void addExistingTextureToCache(GrTexture* texture);
+
+ typedef GrRefCnt INHERITED;
};
/**
diff --git a/include/gpu/GrFontScaler.h b/include/gpu/GrFontScaler.h
index 657647d..a69e912 100644
--- a/include/gpu/GrFontScaler.h
+++ b/include/gpu/GrFontScaler.h
@@ -25,12 +25,17 @@
*/
class GrFontScaler : public GrRefCnt {
public:
+ SK_DECLARE_INST_COUNT(GrFontScaler)
+
virtual const GrKey* getKey() = 0;
virtual GrMaskFormat getMaskFormat() = 0;
virtual bool getPackedGlyphBounds(GrGlyph::PackedID, GrIRect* bounds) = 0;
virtual bool getPackedGlyphImage(GrGlyph::PackedID, int width, int height,
int rowBytes, void* image) = 0;
virtual bool getGlyphPath(uint16_t glyphID, SkPath*) = 0;
+
+private:
+ typedef GrRefCnt INHERITED;
};
#endif
diff --git a/include/gpu/GrKey.h b/include/gpu/GrKey.h
index 813d82d..17d00de 100644
--- a/include/gpu/GrKey.h
+++ b/include/gpu/GrKey.h
@@ -15,6 +15,8 @@
class GrKey : public GrRefCnt {
public:
+ SK_DECLARE_INST_COUNT(GrKey)
+
typedef intptr_t Hash;
explicit GrKey(Hash hash) : fHash(hash) {}
@@ -34,6 +36,8 @@
private:
const Hash fHash;
+
+ typedef GrRefCnt INHERITED;
};
#endif
diff --git a/include/gpu/GrTextContext.h b/include/gpu/GrTextContext.h
index ab1a344..f48b823 100644
--- a/include/gpu/GrTextContext.h
+++ b/include/gpu/GrTextContext.h
@@ -32,6 +32,8 @@
GrContext* fContext;
public:
+ SK_DECLARE_INST_COUNT(GrTextContext)
+
/**
* To use a text context it must be wrapped in an AutoFinish. AutoFinish's
* destructor ensures all drawing is flushed to the GrContext.