Instance counting for SkRefCnt-derived objects (w/ CanvasTest fix)
http://codereview.appspot.com/6242070/
git-svn-id: http://skia.googlecode.com/svn/trunk@4170 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/core/SkRefCnt.cpp b/src/core/SkRefCnt.cpp
new file mode 100644
index 0000000..111ecd8
--- /dev/null
+++ b/src/core/SkRefCnt.cpp
@@ -0,0 +1,12 @@
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+
+#include "SkRefCnt.h"
+
+DEFINE_INST_COUNT(SkRefCnt)
+
diff --git a/src/gpu/GrResource.cpp b/src/gpu/GrResource.cpp
index 9efc838..a5168c8 100644
--- a/src/gpu/GrResource.cpp
+++ b/src/gpu/GrResource.cpp
@@ -10,6 +10,8 @@
#include "GrResource.h"
#include "GrGpu.h"
+DEFINE_INST_COUNT(GrResource)
+
GrResource::GrResource(GrGpu* gpu) {
fGpu = gpu;
fNext = NULL;