aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-06-26 20:16:17 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-06-26 20:16:17 +0000
commitfa35e3ddcc9d130ce87c927218bdf27879c38711 (patch)
tree5b15d2c18285d887e2b65fd824bb4afbeb758f71 /include/gpu
parenta23d04820955e2c459956a6610063545d3e8f1aa (diff)
plumb SkInstCnt to all subclasses of GrRefCnt
git-svn-id: http://skia.googlecode.com/svn/trunk@4353 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/gpu')
-rw-r--r--include/gpu/GrContext.h4
-rw-r--r--include/gpu/GrFontScaler.h5
-rw-r--r--include/gpu/GrKey.h4
-rw-r--r--include/gpu/GrTextContext.h2
4 files changed, 15 insertions, 0 deletions
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index 6a6b0841d1..f5b44bf628 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -36,6 +36,8 @@ class GrSoftwarePathRenderer;
class GR_API GrContext : public GrRefCnt {
public:
+ SK_DECLARE_INST_COUNT(GrContext)
+
/**
* Creates a GrContext from within a 3D context.
*/
@@ -787,6 +789,8 @@ private:
// 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 657647dea5..a69e91248d 100644
--- a/include/gpu/GrFontScaler.h
+++ b/include/gpu/GrFontScaler.h
@@ -25,12 +25,17 @@ class SkPath;
*/
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 813d82d920..17d00de1b5 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 @@ protected:
private:
const Hash fHash;
+
+ typedef GrRefCnt INHERITED;
};
#endif
diff --git a/include/gpu/GrTextContext.h b/include/gpu/GrTextContext.h
index ab1a344539..f48b8233e9 100644
--- a/include/gpu/GrTextContext.h
+++ b/include/gpu/GrTextContext.h
@@ -32,6 +32,8 @@ protected:
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.