Version 2 of the Instance Counting system. This one simplifies the print out of information.

http://codereview.appspot.com/6296069/



git-svn-id: http://skia.googlecode.com/svn/trunk@4255 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/include/gpu/GrAARectRenderer.h b/include/gpu/GrAARectRenderer.h
index c809091..fdaa30a 100644
--- a/include/gpu/GrAARectRenderer.h
+++ b/include/gpu/GrAARectRenderer.h
@@ -21,7 +21,7 @@
  */
 class GrAARectRenderer : public GrRefCnt {
 public:
-    DECLARE_INST_COUNT
+    SK_DECLARE_INST_COUNT(GrAARectRenderer)
 
     GrAARectRenderer() 
     : fAAFillRectIndexBuffer(NULL)
@@ -62,6 +62,8 @@
 
     static int aaStrokeRectIndexCount();
     GrIndexBuffer* aaStrokeRectIndexBuffer(GrGpu* gpu);
+
+    typedef GrRefCnt INHERITED;
 };
 
 #endif // GrAARectRenderer_DEFINED
diff --git a/include/gpu/GrRenderTarget.h b/include/gpu/GrRenderTarget.h
index 4a2c254..c26ca4b 100644
--- a/include/gpu/GrRenderTarget.h
+++ b/include/gpu/GrRenderTarget.h
@@ -33,6 +33,7 @@
  */
 class GrRenderTarget : public GrResource {
 public:
+    SK_DECLARE_INST_COUNT(GrRenderTarget)
 
     /**
      * @return the width of the rendertarget
diff --git a/include/gpu/GrResource.h b/include/gpu/GrResource.h
index 4c491c7..94d2173 100644
--- a/include/gpu/GrResource.h
+++ b/include/gpu/GrResource.h
@@ -20,7 +20,7 @@
  */
 class GrResource : public GrRefCnt {
 public:
-    DECLARE_INST_COUNT
+    SK_DECLARE_INST_COUNT(GrResource)
 
     /**
      * Frees the resource in the underlying 3D API. It must be safe to call this
diff --git a/include/gpu/GrTexture.h b/include/gpu/GrTexture.h
index 1997f68..704bb28 100644
--- a/include/gpu/GrTexture.h
+++ b/include/gpu/GrTexture.h
@@ -31,6 +31,8 @@
 class GrTexture : public GrResource {
 
 public:
+    SK_DECLARE_INST_COUNT(GrTexture)
+
     /**
      * Retrieves the width of the texture.
      *