Fix compilation with SK_ENABLE_INST_COUNT=1

Add INHERITED declarations to class declarations that prevent
compilation with the flag.

Remove SK_DEFINE_INST_COUNT from all class implementations.  Instead,
use function-local static variables in the reference count helper
classes to create the global instances to store the needed info. The
accessor functions are defined inline in the helper classes, so
definitions are not needed. The initialization point of the variables
should be as well defined as previously.

Remove SK_DECLARE_INST_COUNT_TEMPLATE and use SK_DECLARE_INST_COUNT
instead. This avoids possible future compilation errors further.

For SK_ENABLE_INST_COUNT=0 compilation, add an empty static member
function to all classes that use SK_DECLARE_INST_COUNT and
SK_DECLARE_INST_COUNT_ROOT macros. The function ensures that classes
contain public INHERITED typedef. This member function seems to be
compiled away. This shou─║d ensure that part of the compilation errors
are caught earlier.

Also adds DSK_DECLARE_INST_COUNT to few SkPDFDict subclasses.

R=robertphillips@google.com, richardlin@chromium.org, bsalomon@google.com

Author: kkinnunen@nvidia.com

Review URL: https://codereview.chromium.org/98703002

git-svn-id: http://skia.googlecode.com/svn/trunk/src@12501 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/core/SkAdvancedTypefaceMetrics.cpp b/core/SkAdvancedTypefaceMetrics.cpp
index c7ed34d..ce64a42 100644
--- a/core/SkAdvancedTypefaceMetrics.cpp
+++ b/core/SkAdvancedTypefaceMetrics.cpp
@@ -10,8 +10,6 @@
 #include "SkAdvancedTypefaceMetrics.h"
 #include "SkTypes.h"
 
-SK_DEFINE_INST_COUNT(SkAdvancedTypefaceMetrics)
-
 #if defined(SK_BUILD_FOR_WIN)
 #include <dwrite.h>
 #endif
diff --git a/core/SkBBoxHierarchy.cpp b/core/SkBBoxHierarchy.cpp
deleted file mode 100644
index 5232fb7..0000000
--- a/core/SkBBoxHierarchy.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
-
-/*
- * 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 "SkBBoxHierarchy.h"
-
-SK_DEFINE_INST_COUNT(SkBBoxHierarchy)
diff --git a/core/SkBitmap.cpp b/core/SkBitmap.cpp
index ad840c4..d2a308b 100644
--- a/core/SkBitmap.cpp
+++ b/core/SkBitmap.cpp
@@ -24,8 +24,6 @@
 #include "SkPackBits.h"
 #include <new>
 
-SK_DEFINE_INST_COUNT(SkBitmap::Allocator)
-
 static bool isPos32Bits(const Sk64& value) {
     return !value.isNeg() && value.is32();
 }
diff --git a/core/SkBitmapDevice.cpp b/core/SkBitmapDevice.cpp
index 2d7e413..1668618 100644
--- a/core/SkBitmapDevice.cpp
+++ b/core/SkBitmapDevice.cpp
@@ -11,8 +11,6 @@
 #include "SkRasterClip.h"
 #include "SkShader.h"
 
-SK_DEFINE_INST_COUNT(SkBitmapDevice)
-
 #define CHECK_FOR_ANNOTATION(paint) \
     do { if (paint.getAnnotation()) { return; } } while (0)
 
diff --git a/core/SkBitmapHeap.cpp b/core/SkBitmapHeap.cpp
index a171138..1f2f3dc 100644
--- a/core/SkBitmapHeap.cpp
+++ b/core/SkBitmapHeap.cpp
@@ -12,9 +12,6 @@
 #include "SkFlattenableBuffers.h"
 #include "SkTSearch.h"
 
-SK_DEFINE_INST_COUNT(SkBitmapHeapReader)
-SK_DEFINE_INST_COUNT(SkBitmapHeap::ExternalStorage)
-
 SkBitmapHeapEntry::SkBitmapHeapEntry()
     : fSlot(-1)
     , fRefCount(0)
diff --git a/core/SkCanvas.cpp b/core/SkCanvas.cpp
index 4eaea11..47d3cca 100644
--- a/core/SkCanvas.cpp
+++ b/core/SkCanvas.cpp
@@ -30,10 +30,6 @@
 #include "GrRenderTarget.h"
 #endif
 
-SK_DEFINE_INST_COUNT(SkBounder)
-SK_DEFINE_INST_COUNT(SkCanvas)
-SK_DEFINE_INST_COUNT(SkDrawFilter)
-
 // experimental for faster tiled drawing...
 //#define SK_ENABLE_CLIP_QUICKREJECT
 
diff --git a/core/SkColorFilter.cpp b/core/SkColorFilter.cpp
index abf191e..ef0bda7 100644
--- a/core/SkColorFilter.cpp
+++ b/core/SkColorFilter.cpp
@@ -12,8 +12,6 @@
 #include "SkUnPreMultiply.h"
 #include "SkString.h"
 
-SK_DEFINE_INST_COUNT(SkColorFilter)
-
 bool SkColorFilter::asColorMode(SkColor* color, SkXfermode::Mode* mode) const {
     return false;
 }
diff --git a/core/SkColorTable.cpp b/core/SkColorTable.cpp
index 38a46c5..c719def 100644
--- a/core/SkColorTable.cpp
+++ b/core/SkColorTable.cpp
@@ -12,8 +12,6 @@
 #include "SkStream.h"
 #include "SkTemplates.h"
 
-SK_DEFINE_INST_COUNT(SkColorTable)
-
 // As copy constructor is hidden in the class hierarchy, we need to call
 // default constructor explicitly to suppress a compiler warning.
 SkColorTable::SkColorTable(const SkColorTable& src) : INHERITED() {
diff --git a/core/SkData.cpp b/core/SkData.cpp
index 56c1256..fd963a9 100644
--- a/core/SkData.cpp
+++ b/core/SkData.cpp
@@ -10,8 +10,6 @@
 #include "SkOSFile.h"
 #include "SkOnce.h"
 
-SK_DEFINE_INST_COUNT(SkData)
-
 SkData::SkData(const void* ptr, size_t size, ReleaseProc proc, void* context) {
     fPtr = ptr;
     fSize = size;
diff --git a/core/SkDataTable.cpp b/core/SkDataTable.cpp
index 917445c..e2644a0 100644
--- a/core/SkDataTable.cpp
+++ b/core/SkDataTable.cpp
@@ -8,8 +8,6 @@
 #include "SkData.h"
 #include "SkDataTable.h"
 
-SK_DEFINE_INST_COUNT(SkDataTable)
-
 static void malloc_freeproc(void* context) {
     sk_free(context);
 }
diff --git a/core/SkDevice.cpp b/core/SkDevice.cpp
index c0d4ad3..0c9e9d6 100644
--- a/core/SkDevice.cpp
+++ b/core/SkDevice.cpp
@@ -9,8 +9,6 @@
 #include "SkDevice.h"
 #include "SkMetaData.h"
 
-SK_DEFINE_INST_COUNT(SkBaseDevice)
-
 #if SK_PMCOLOR_BYTE_ORDER(B,G,R,A)
     const SkCanvas::Config8888 SkBaseDevice::kPMColorAlias = SkCanvas::kBGRA_Premul_Config8888;
 #elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A)
diff --git a/core/SkDeviceProfile.cpp b/core/SkDeviceProfile.cpp
index a15069a..8d60151 100644
--- a/core/SkDeviceProfile.cpp
+++ b/core/SkDeviceProfile.cpp
@@ -9,8 +9,6 @@
 #include "SkDeviceProfile.h"
 #include "SkThread.h"
 
-SK_DEFINE_INST_COUNT(SkDeviceProfile)
-
 #define DEFAULT_GAMMAEXP        2.2f
 #define DEFAULT_CONTRASTSCALE   0.5f
 #define DEFAULT_LCDCONFIG       SkDeviceProfile::kNone_LCDConfig
diff --git a/core/SkDrawLooper.cpp b/core/SkDrawLooper.cpp
index 0277986..bac2d96 100644
--- a/core/SkDrawLooper.cpp
+++ b/core/SkDrawLooper.cpp
@@ -11,8 +11,6 @@
 #include "SkPaint.h"
 #include "SkRect.h"
 
-SK_DEFINE_INST_COUNT(SkDrawLooper)
-
 bool SkDrawLooper::canComputeFastBounds(const SkPaint& paint) {
     SkCanvas canvas;
 
diff --git a/core/SkFlattenable.cpp b/core/SkFlattenable.cpp
index 6cebb22..877fa0a 100644
--- a/core/SkFlattenable.cpp
+++ b/core/SkFlattenable.cpp
@@ -8,8 +8,6 @@
 #include "SkFlattenable.h"
 #include "SkPtrRecorder.h"
 
-SK_DEFINE_INST_COUNT(SkFlattenable)
-
 ///////////////////////////////////////////////////////////////////////////////
 
 void SkFlattenable::flatten(SkFlattenableWriteBuffer&) const
diff --git a/core/SkFontHost.cpp b/core/SkFontHost.cpp
index f3d30e8..a209b97 100644
--- a/core/SkFontHost.cpp
+++ b/core/SkFontHost.cpp
@@ -69,8 +69,6 @@
 
 #include "SkFontMgr.h"
 
-SK_DEFINE_INST_COUNT(SkFontStyleSet)
-
 class SkEmptyFontStyleSet : public SkFontStyleSet {
 public:
     virtual int count() SK_OVERRIDE { return 0; }
@@ -92,8 +90,6 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 
-SK_DEFINE_INST_COUNT(SkFontMgr)
-
 class SkEmptyFontMgr : public SkFontMgr {
 protected:
     virtual int onCountFamilies() SK_OVERRIDE {
diff --git a/core/SkImageFilter.cpp b/core/SkImageFilter.cpp
index aadf904..2a221fb 100644
--- a/core/SkImageFilter.cpp
+++ b/core/SkImageFilter.cpp
@@ -17,8 +17,6 @@
 #include "SkImageFilterUtils.h"
 #endif
 
-SK_DEFINE_INST_COUNT(SkImageFilter)
-
 SkImageFilter::SkImageFilter(int inputCount, SkImageFilter** inputs, const CropRect* cropRect)
   : fInputCount(inputCount),
     fInputs(new SkImageFilter*[inputCount]),
diff --git a/core/SkMaskFilter.cpp b/core/SkMaskFilter.cpp
index cd25716..f062f13 100644
--- a/core/SkMaskFilter.cpp
+++ b/core/SkMaskFilter.cpp
@@ -21,8 +21,6 @@
 #include "SkGrPixelRef.h"
 #endif
 
-SK_DEFINE_INST_COUNT(SkMaskFilter)
-
 bool SkMaskFilter::filterMask(SkMask*, const SkMask&, const SkMatrix&,
                               SkIPoint*) const {
     return false;
diff --git a/core/SkMaskGamma.h b/core/SkMaskGamma.h
index 9d3fd9a..1f2b73c 100644
--- a/core/SkMaskGamma.h
+++ b/core/SkMaskGamma.h
@@ -92,8 +92,8 @@
  * @param B The number of luminance bits to use [1, 8] from the blue channel.
  */
 template <int R_LUM_BITS, int G_LUM_BITS, int B_LUM_BITS> class SkTMaskGamma : public SkRefCnt {
+    SK_DECLARE_INST_COUNT(SkTMaskGamma)
 public:
-    SK_DECLARE_INST_COUNT_TEMPLATE(SkTMaskGamma)
 
     /** Creates a linear SkTMaskGamma. */
     SkTMaskGamma() : fIsLinear(true) { }
@@ -147,11 +147,6 @@
 };
 
 
-#define MacroComma ,
-SK_DEFINE_INST_COUNT_TEMPLATE(
-    template <int R_LUM_BITS MacroComma int G_LUM_BITS MacroComma int B_LUM_BITS>,
-    SkTMaskGamma<R_LUM_BITS MacroComma G_LUM_BITS MacroComma B_LUM_BITS>);
-
 /**
  * SkTMaskPreBlend is a tear-off of SkTMaskGamma. It provides the tables to
  * convert a linear alpha value for a given channel to a gamma correcting alpha
diff --git a/core/SkPath.cpp b/core/SkPath.cpp
index 6c48e56..eaa6c93 100644
--- a/core/SkPath.cpp
+++ b/core/SkPath.cpp
@@ -15,8 +15,6 @@
 #include "SkRRect.h"
 #include "SkThread.h"
 
-SK_DEFINE_INST_COUNT(SkPath);
-
 // This value is just made-up for now. When count is 4, calling memset was much
 // slower than just writing the loop. This seems odd, and hopefully in the
 // future this we appear to have been a fluke...
diff --git a/core/SkPathEffect.cpp b/core/SkPathEffect.cpp
index e7f6822..59ba3ec 100644
--- a/core/SkPathEffect.cpp
+++ b/core/SkPathEffect.cpp
@@ -12,8 +12,6 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 
-SK_DEFINE_INST_COUNT(SkPathEffect)
-
 void SkPathEffect::computeFastBounds(SkRect* dst, const SkRect& src) const {
     *dst = src;
 }
diff --git a/core/SkPathHeap.cpp b/core/SkPathHeap.cpp
index 12db3c4..c6e2129 100644
--- a/core/SkPathHeap.cpp
+++ b/core/SkPathHeap.cpp
@@ -11,8 +11,6 @@
 #include "SkFlattenableBuffers.h"
 #include <new>
 
-SK_DEFINE_INST_COUNT(SkPathHeap)
-
 #define kPathCount  64
 
 SkPathHeap::SkPathHeap() : fHeap(kPathCount * sizeof(SkPath)) {
diff --git a/core/SkPathRef.cpp b/core/SkPathRef.cpp
index 1678fdc..a02df30 100644
--- a/core/SkPathRef.cpp
+++ b/core/SkPathRef.cpp
@@ -10,8 +10,6 @@
 #include "SkPath.h"
 #include "SkPathRef.h"
 
-SK_DEFINE_INST_COUNT(SkPathRef);
-
 //////////////////////////////////////////////////////////////////////////////
 SkPathRef::Editor::Editor(SkAutoTUnref<SkPathRef>* pathRef,
                           int incReserveVerbs,
diff --git a/core/SkPicture.cpp b/core/SkPicture.cpp
index 9531d18..2b9b9e9 100644
--- a/core/SkPicture.cpp
+++ b/core/SkPicture.cpp
@@ -26,8 +26,6 @@
 #include "SkRTree.h"
 #include "SkBBoxHierarchyRecord.h"
 
-SK_DEFINE_INST_COUNT(SkPicture)
-
 #define DUMP_BUFFER_SIZE 65536
 
 //#define ENABLE_TIME_DRAW    // dumps milliseconds for each draw
diff --git a/core/SkPictureFlat.cpp b/core/SkPictureFlat.cpp
index 2a7d15a..149cf7c 100644
--- a/core/SkPictureFlat.cpp
+++ b/core/SkPictureFlat.cpp
@@ -16,8 +16,6 @@
 #include "SkTypeface.h"
 #include "SkXfermode.h"
 
-SK_DEFINE_INST_COUNT(SkFlatController)
-
 ///////////////////////////////////////////////////////////////////////////////
 
 SkTypefacePlayback::SkTypefacePlayback() : fCount(0), fArray(NULL) {}
diff --git a/core/SkPictureStateTree.cpp b/core/SkPictureStateTree.cpp
index 9f2db25..5f4ed93 100644
--- a/core/SkPictureStateTree.cpp
+++ b/core/SkPictureStateTree.cpp
@@ -9,8 +9,6 @@
 #include "SkPictureStateTree.h"
 #include "SkCanvas.h"
 
-SK_DEFINE_INST_COUNT(SkPictureStateTree)
-
 SkPictureStateTree::SkPictureStateTree()
     : fAlloc(2048)
     , fRoot(NULL)
diff --git a/core/SkPixelRef.cpp b/core/SkPixelRef.cpp
index 068513b..1afc336 100644
--- a/core/SkPixelRef.cpp
+++ b/core/SkPixelRef.cpp
@@ -9,9 +9,6 @@
 #include "SkFlattenableBuffers.h"
 #include "SkThread.h"
 
-SK_DEFINE_INST_COUNT(SkPixelRef)
-
-
 #ifdef SK_USE_POSIX_THREADS
 
     static SkBaseMutex gPixelRefMutexRing[] = {
diff --git a/core/SkPtrRecorder.cpp b/core/SkPtrRecorder.cpp
index 2acb5af..aae28d0 100644
--- a/core/SkPtrRecorder.cpp
+++ b/core/SkPtrRecorder.cpp
@@ -8,9 +8,6 @@
 #include "SkPtrRecorder.h"
 #include "SkTSearch.h"
 
-SK_DEFINE_INST_COUNT(SkPtrSet)
-SK_DEFINE_INST_COUNT(SkNamedFactorySet)
-
 void SkPtrSet::reset() {
     Pair* p = fList.begin();
     Pair* stop = fList.end();
diff --git a/core/SkRTree.cpp b/core/SkRTree.cpp
index e3d2eb6..253a7ee 100644
--- a/core/SkRTree.cpp
+++ b/core/SkRTree.cpp
@@ -16,8 +16,6 @@
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-SK_DEFINE_INST_COUNT(SkRTree)
-
 SkRTree* SkRTree::Create(int minChildren, int maxChildren, SkScalar aspectRatio,
             bool sortWhenBulkLoading) {
     if (minChildren < maxChildren && (maxChildren + 1) / 2 >= minChildren &&
diff --git a/core/SkRasterizer.cpp b/core/SkRasterizer.cpp
index a65d541..3a7af95 100644
--- a/core/SkRasterizer.cpp
+++ b/core/SkRasterizer.cpp
@@ -12,8 +12,6 @@
 #include "SkMaskFilter.h"
 #include "SkPath.h"
 
-SK_DEFINE_INST_COUNT(SkRasterizer)
-
 bool SkRasterizer::rasterize(const SkPath& fillPath, const SkMatrix& matrix,
                              const SkIRect* clipBounds, SkMaskFilter* filter,
                              SkMask* mask, SkMask::CreateMode mode) const {
diff --git a/core/SkRefCnt.cpp b/core/SkRefCnt.cpp
deleted file mode 100644
index b922e03..0000000
--- a/core/SkRefCnt.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * 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"
-#include "SkWeakRefCnt.h"
-
-SK_DEFINE_INST_COUNT(SkRefCntBase)
-SK_DEFINE_INST_COUNT(SkWeakRefCnt)
diff --git a/core/SkShader.cpp b/core/SkShader.cpp
index 8f6bfb5..33fddb1 100644
--- a/core/SkShader.cpp
+++ b/core/SkShader.cpp
@@ -12,8 +12,6 @@
 #include "SkPaint.h"
 #include "SkMallocPixelRef.h"
 
-SK_DEFINE_INST_COUNT(SkShader)
-
 SkShader::SkShader() {
     fLocalMatrix.reset();
     SkDEBUGCODE(fInSetContext = false;)
diff --git a/core/SkStream.cpp b/core/SkStream.cpp
index a7e92cf..3350f82 100644
--- a/core/SkStream.cpp
+++ b/core/SkStream.cpp
@@ -13,15 +13,6 @@
 #include "SkString.h"
 #include "SkOSFile.h"
 
-SK_DEFINE_INST_COUNT(SkStream)
-SK_DEFINE_INST_COUNT(SkWStream)
-SK_DEFINE_INST_COUNT(SkFILEStream)
-SK_DEFINE_INST_COUNT(SkMemoryStream)
-SK_DEFINE_INST_COUNT(SkFILEWStream)
-SK_DEFINE_INST_COUNT(SkMemoryWStream)
-SK_DEFINE_INST_COUNT(SkDynamicMemoryWStream)
-SK_DEFINE_INST_COUNT(SkDebugWStream)
-
 ///////////////////////////////////////////////////////////////////////////////
 
 
diff --git a/core/SkTypeface.cpp b/core/SkTypeface.cpp
index 2362761..09a6432 100644
--- a/core/SkTypeface.cpp
+++ b/core/SkTypeface.cpp
@@ -11,8 +11,6 @@
 #include "SkStream.h"
 #include "SkTypeface.h"
 
-SK_DEFINE_INST_COUNT(SkTypeface)
-
 //#define TRACE_LIFECYCLE
 
 #ifdef TRACE_LIFECYCLE
diff --git a/core/SkXfermode.cpp b/core/SkXfermode.cpp
index 20d8816..313e2ae 100644
--- a/core/SkXfermode.cpp
+++ b/core/SkXfermode.cpp
@@ -19,8 +19,6 @@
 #include "SkXfermode_opts_arm_neon.h"
 #endif
 
-SK_DEFINE_INST_COUNT(SkXfermode)
-
 #define SkAlphaMulAlpha(a, b)   SkMulDiv255Round(a, b)
 
 #if 0
diff --git a/doc/SkDocument.cpp b/doc/SkDocument.cpp
index 85a2bad..5b2237d 100644
--- a/doc/SkDocument.cpp
+++ b/doc/SkDocument.cpp
@@ -8,8 +8,6 @@
 #include "SkDocument.h"
 #include "SkStream.h"
 
-SK_DEFINE_INST_COUNT(SkDocument)
-
 SkDocument::SkDocument(SkWStream* stream, void (*doneProc)(SkWStream*, bool)) {
     fStream = stream;   // we do not own this object.
     fDoneProc = doneProc;
diff --git a/effects/SkBitmapAlphaThresholdShader.cpp b/effects/SkBitmapAlphaThresholdShader.cpp
index 05d7ba3..44db167 100644
--- a/effects/SkBitmapAlphaThresholdShader.cpp
+++ b/effects/SkBitmapAlphaThresholdShader.cpp
@@ -34,8 +34,6 @@
     typedef SkShader INHERITED;
 };
 
-SK_DEFINE_INST_COUNT(BATShader)
-
 SkShader* SkBitmapAlphaThresholdShader::Create(const SkBitmap& bitmap,
                                                const SkRegion& region,
                                                U8CPU threshold) {
diff --git a/effects/SkLayerDrawLooper.cpp b/effects/SkLayerDrawLooper.cpp
index 998c4bc..65f058b 100644
--- a/effects/SkLayerDrawLooper.cpp
+++ b/effects/SkLayerDrawLooper.cpp
@@ -13,8 +13,6 @@
 #include "SkStringUtils.h"
 #include "SkUnPreMultiply.h"
 
-SK_DEFINE_INST_COUNT(SkLayerDrawLooper)
-
 SkLayerDrawLooper::LayerInfo::LayerInfo() {
     fFlagsMask = 0;                     // ignore our paint flags
     fPaintBits = 0;                     // ignore our paint fields
diff --git a/effects/SkLightingImageFilter.cpp b/effects/SkLightingImageFilter.cpp
index 4e3cee0..50cca07 100644
--- a/effects/SkLightingImageFilter.cpp
+++ b/effects/SkLightingImageFilter.cpp
@@ -549,8 +549,6 @@
     SkPoint3 fColor;
 };
 
-SK_DEFINE_INST_COUNT(SkLight)
-
 ///////////////////////////////////////////////////////////////////////////////
 
 class SkDistantLight : public SkLight {
diff --git a/gpu/GrAARectRenderer.cpp b/gpu/GrAARectRenderer.cpp
index aa599ca..2c21f09 100644
--- a/gpu/GrAARectRenderer.cpp
+++ b/gpu/GrAARectRenderer.cpp
@@ -13,8 +13,6 @@
 #include "SkColorPriv.h"
 #include "effects/GrVertexEffect.h"
 
-SK_DEFINE_INST_COUNT(GrAARectRenderer)
-
 ///////////////////////////////////////////////////////////////////////////////
 class GrGLAlignedRectEffect;
 
diff --git a/gpu/GrContext.cpp b/gpu/GrContext.cpp
index 433b0bb..0eb8c5b 100644
--- a/gpu/GrContext.cpp
+++ b/gpu/GrContext.cpp
@@ -32,9 +32,6 @@
 #include "SkTLS.h"
 #include "SkTrace.h"
 
-SK_DEFINE_INST_COUNT(GrContext)
-SK_DEFINE_INST_COUNT(GrDrawState)
-
 // It can be useful to set this to false to test whether a bug is caused by using the
 // InOrderDrawBuffer, to compare performance of using/not using InOrderDrawBuffer, or to make
 // debugging simpler.
diff --git a/gpu/GrDrawTarget.cpp b/gpu/GrDrawTarget.cpp
index 6a1c454..0b4d96a 100644
--- a/gpu/GrDrawTarget.cpp
+++ b/gpu/GrDrawTarget.cpp
@@ -18,8 +18,6 @@
 
 #include "SkStrokeRec.h"
 
-SK_DEFINE_INST_COUNT(GrDrawTarget)
-
 ////////////////////////////////////////////////////////////////////////////////
 
 GrDrawTarget::DrawInfo& GrDrawTarget::DrawInfo::operator =(const DrawInfo& di) {
@@ -962,8 +960,6 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 
-SK_DEFINE_INST_COUNT(GrDrawTargetCaps)
-
 void GrDrawTargetCaps::reset() {
     f8BitPaletteSupport = false;
     fNPOTTextureTileSupport = false;
diff --git a/gpu/GrEffect.cpp b/gpu/GrEffect.cpp
index a64fd7c..986e80a 100644
--- a/gpu/GrEffect.cpp
+++ b/gpu/GrEffect.cpp
@@ -12,8 +12,6 @@
 #include "GrMemoryPool.h"
 #include "SkTLS.h"
 
-SK_DEFINE_INST_COUNT(GrEffect)
-
 #if SK_ALLOW_STATIC_GLOBAL_INITIALIZERS
 SkTArray<GrEffectTestFactory*, true>* GrEffectTestFactory::GetFactories() {
     static SkTArray<GrEffectTestFactory*, true> gFactories;
@@ -61,8 +59,6 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 
-SK_DEFINE_INST_COUNT(GrEffectRef)
-
 GrEffectRef::~GrEffectRef() {
     SkASSERT(this->unique());
     fEffect->EffectRefDestroyed();
diff --git a/gpu/GrGeometryBuffer.cpp b/gpu/GrGeometryBuffer.cpp
deleted file mode 100644
index 202d0c3..0000000
--- a/gpu/GrGeometryBuffer.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- * 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 "GrGeometryBuffer.h"
-
-SK_DEFINE_INST_COUNT(GrGeometryBuffer)
diff --git a/gpu/GrOvalRenderer.cpp b/gpu/GrOvalRenderer.cpp
index 8f078db..ac33a5c 100644
--- a/gpu/GrOvalRenderer.cpp
+++ b/gpu/GrOvalRenderer.cpp
@@ -22,8 +22,6 @@
 
 #include "effects/GrVertexEffect.h"
 
-SK_DEFINE_INST_COUNT(GrOvalRenderer)
-
 namespace {
 
 struct CircleVertex {
diff --git a/gpu/GrPath.cpp b/gpu/GrPath.cpp
index f928dff..adb3fe6 100644
--- a/gpu/GrPath.cpp
+++ b/gpu/GrPath.cpp
@@ -7,8 +7,6 @@
 
 #include "GrPath.h"
 
-SK_DEFINE_INST_COUNT(GrPath)
-
 GrResourceKey GrPath::ComputeKey(const SkPath& path, const SkStrokeRec& stroke) {
     static const GrResourceKey::ResourceType gPathResourceType = GrResourceKey::GenerateResourceType();
     static const GrCacheID::Domain gPathDomain = GrCacheID::GenerateDomain();
diff --git a/gpu/GrPathRenderer.cpp b/gpu/GrPathRenderer.cpp
index e88db22..3dcedf9 100644
--- a/gpu/GrPathRenderer.cpp
+++ b/gpu/GrPathRenderer.cpp
@@ -8,8 +8,6 @@
 
 #include "GrPathRenderer.h"
 
-SK_DEFINE_INST_COUNT(GrPathRenderer)
-
 GrPathRenderer::GrPathRenderer() {
 }
 
diff --git a/gpu/GrPathRendererChain.cpp b/gpu/GrPathRendererChain.cpp
index d6de12b..cac0475 100644
--- a/gpu/GrPathRendererChain.cpp
+++ b/gpu/GrPathRendererChain.cpp
@@ -14,8 +14,6 @@
 #include "GrDrawTargetCaps.h"
 #include "GrGpu.h"
 
-SK_DEFINE_INST_COUNT(GrPathRendererChain)
-
 GrPathRendererChain::GrPathRendererChain(GrContext* context)
     : fInit(false)
     , fOwner(context) {
diff --git a/gpu/GrRenderTarget.cpp b/gpu/GrRenderTarget.cpp
index 49a7614..f18df2c 100644
--- a/gpu/GrRenderTarget.cpp
+++ b/gpu/GrRenderTarget.cpp
@@ -13,8 +13,6 @@
 #include "GrGpu.h"
 #include "GrStencilBuffer.h"
 
-SK_DEFINE_INST_COUNT(GrRenderTarget)
-
 bool GrRenderTarget::readPixels(int left, int top, int width, int height,
                                 GrPixelConfig config,
                                 void* buffer,
diff --git a/gpu/GrResource.cpp b/gpu/GrResource.cpp
index 8b43906..e20a30f 100644
--- a/gpu/GrResource.cpp
+++ b/gpu/GrResource.cpp
@@ -10,8 +10,6 @@
 #include "GrResource.h"
 #include "GrGpu.h"
 
-SK_DEFINE_INST_COUNT(GrResource)
-
 GrResource::GrResource(GrGpu* gpu, bool isWrapped) {
     fGpu              = gpu;
     fCacheEntry       = NULL;
diff --git a/gpu/GrStencilBuffer.cpp b/gpu/GrStencilBuffer.cpp
index c12de52..ea7b4fa 100644
--- a/gpu/GrStencilBuffer.cpp
+++ b/gpu/GrStencilBuffer.cpp
@@ -12,8 +12,6 @@
 #include "GrGpu.h"
 #include "GrResourceCache.h"
 
-SK_DEFINE_INST_COUNT(GrStencilBuffer)
-
 void GrStencilBuffer::transferToCache() {
     SkASSERT(NULL == this->getCacheEntry());
 
diff --git a/gpu/GrSurface.cpp b/gpu/GrSurface.cpp
index 3ac8bc2..fed95f2 100644
--- a/gpu/GrSurface.cpp
+++ b/gpu/GrSurface.cpp
@@ -11,8 +11,6 @@
 #include "SkImageEncoder.h"
 #include <stdio.h>
 
-SK_DEFINE_INST_COUNT(GrSurface)
-
 bool GrSurface::savePixels(const char* filename) {
     SkBitmap bm;
     bm.setConfig(SkBitmap::kARGB_8888_Config, this->width(), this->height());
diff --git a/gpu/GrTextStrike.cpp b/gpu/GrTextStrike.cpp
index bae5361..c70e822 100644
--- a/gpu/GrTextStrike.cpp
+++ b/gpu/GrTextStrike.cpp
@@ -16,9 +16,6 @@
 #include "edtaa3.h"
 #endif
 
-SK_DEFINE_INST_COUNT(GrFontScaler)
-SK_DEFINE_INST_COUNT(GrKey)
-
 ///////////////////////////////////////////////////////////////////////////////
 
 #define FONT_CACHE_STATS 0
diff --git a/gpu/GrTexture.cpp b/gpu/GrTexture.cpp
index b5a0195..f851515 100644
--- a/gpu/GrTexture.cpp
+++ b/gpu/GrTexture.cpp
@@ -15,8 +15,6 @@
 #include "GrRenderTarget.h"
 #include "GrResourceCache.h"
 
-SK_DEFINE_INST_COUNT(GrTexture)
-
 GrTexture::~GrTexture() {
     if (NULL != fRenderTarget.get()) {
         fRenderTarget.get()->owningTextureDestroyed();
diff --git a/gpu/gl/GrGLCaps.cpp b/gpu/gl/GrGLCaps.cpp
index 1a39ba5..8d8c022 100644
--- a/gpu/gl/GrGLCaps.cpp
+++ b/gpu/gl/GrGLCaps.cpp
@@ -11,8 +11,6 @@
 #include "SkTSearch.h"
 #include "SkTSort.h"
 
-SK_DEFINE_INST_COUNT(GrGLCaps)
-
 GrGLCaps::GrGLCaps() {
     this->reset();
 }
diff --git a/gpu/gl/GrGLInterface.cpp b/gpu/gl/GrGLInterface.cpp
index 09f6a65..e1c69e1 100644
--- a/gpu/gl/GrGLInterface.cpp
+++ b/gpu/gl/GrGLInterface.cpp
@@ -12,8 +12,6 @@
 
 #include <stdio.h>
 
-SK_DEFINE_INST_COUNT(GrGLInterface)
-
 #if GR_GL_PER_GL_FUNC_CALLBACK
 namespace {
 void GrGLDefaultInterfaceCallback(const GrGLInterface*) {}
diff --git a/gpu/gl/GrGLProgram.cpp b/gpu/gl/GrGLProgram.cpp
index 5b030fa..cac38b4 100644
--- a/gpu/gl/GrGLProgram.cpp
+++ b/gpu/gl/GrGLProgram.cpp
@@ -17,8 +17,6 @@
 #include "GrGLSL.h"
 #include "SkXfermode.h"
 
-SK_DEFINE_INST_COUNT(GrGLProgram)
-
 #define GL_CALL(X) GR_GL_CALL(fGpu->glInterface(), X)
 #define GL_CALL_RET(R, X) GR_GL_CALL_RET(fGpu->glInterface(), R, X)
 
diff --git a/gpu/gl/GrGLTexture.cpp b/gpu/gl/GrGLTexture.cpp
index 9772122..856cfb1 100644
--- a/gpu/gl/GrGLTexture.cpp
+++ b/gpu/gl/GrGLTexture.cpp
@@ -8,8 +8,6 @@
 #include "GrGLTexture.h"
 #include "GrGpuGL.h"
 
-SK_DEFINE_INST_COUNT(GrGLTexID)
-
 #define GPUGL static_cast<GrGpuGL*>(getGpu())
 
 #define GL_CALL(X) GR_GL_CALL(GPUGL->glInterface(), X)
diff --git a/gpu/gl/GrGpuGL_program.cpp b/gpu/gl/GrGpuGL_program.cpp
index a777e8f..a3beab1 100644
--- a/gpu/gl/GrGpuGL_program.cpp
+++ b/gpu/gl/GrGpuGL_program.cpp
@@ -27,8 +27,6 @@
     unsigned int                fLRUStamp;
 };
 
-SK_DEFINE_INST_COUNT(GrGpuGL::ProgramCache::Entry);
-
 struct GrGpuGL::ProgramCache::ProgDescLess {
     bool operator() (const GrGLProgramDesc& desc, const Entry* entry) {
         SkASSERT(NULL != entry->fProgram.get());
diff --git a/gpu/gl/SkGLContextHelper.cpp b/gpu/gl/SkGLContextHelper.cpp
index 6f0372d..da446be 100644
--- a/gpu/gl/SkGLContextHelper.cpp
+++ b/gpu/gl/SkGLContextHelper.cpp
@@ -8,8 +8,6 @@
 #include "gl/SkGLContextHelper.h"
 #include "GrGLUtil.h"
 
-SK_DEFINE_INST_COUNT(SkGLContextHelper)
-
 SkGLContextHelper::SkGLContextHelper()
     : fFBO(0)
     , fColorBufferID(0)
diff --git a/gpu/gl/debug/GrGLCreateDebugInterface.cpp b/gpu/gl/debug/GrGLCreateDebugInterface.cpp
index 2ccd158..1a0e7ac 100644
--- a/gpu/gl/debug/GrGLCreateDebugInterface.cpp
+++ b/gpu/gl/debug/GrGLCreateDebugInterface.cpp
@@ -786,8 +786,6 @@
     typedef GrGLInterface INHERITED;
 };
 
-SK_DEFINE_INST_COUNT(GrDebugGLInterface)
-
 ////////////////////////////////////////////////////////////////////////////////
 const GrGLInterface* GrGLCreateDebugInterface() {
     GrGLInterface* interface = SkNEW(GrDebugGLInterface);
diff --git a/image/SkImage.cpp b/image/SkImage.cpp
index 39fd93a..620922f 100644
--- a/image/SkImage.cpp
+++ b/image/SkImage.cpp
@@ -10,8 +10,6 @@
 #include "SkImagePriv.h"
 #include "SkImage_Base.h"
 
-SK_DEFINE_INST_COUNT(SkImage)
-
 static SkImage_Base* as_IB(SkImage* image) {
     return static_cast<SkImage_Base*>(image);
 }
diff --git a/image/SkImage_Gpu.cpp b/image/SkImage_Gpu.cpp
index 036e45b..ab0a523 100644
--- a/image/SkImage_Gpu.cpp
+++ b/image/SkImage_Gpu.cpp
@@ -36,8 +36,6 @@
     typedef SkImage_Base INHERITED;
 };
 
-SK_DEFINE_INST_COUNT(SkImage_Gpu)
-
 ///////////////////////////////////////////////////////////////////////////////
 
 SkImage_Gpu::SkImage_Gpu(const SkBitmap& bitmap)
diff --git a/image/SkSurface.cpp b/image/SkSurface.cpp
index 2fd4e10..2dde36b 100644
--- a/image/SkSurface.cpp
+++ b/image/SkSurface.cpp
@@ -9,8 +9,6 @@
 #include "SkImagePriv.h"
 #include "SkCanvas.h"
 
-SK_DEFINE_INST_COUNT(SkSurface)
-
 ///////////////////////////////////////////////////////////////////////////////
 
 SkSurface_Base::SkSurface_Base(int width, int height) : INHERITED(width, height) {
diff --git a/image/SkSurface_Gpu.cpp b/image/SkSurface_Gpu.cpp
index e9049ae..e673cef 100644
--- a/image/SkSurface_Gpu.cpp
+++ b/image/SkSurface_Gpu.cpp
@@ -31,8 +31,6 @@
     typedef SkSurface_Base INHERITED;
 };
 
-SK_DEFINE_INST_COUNT(SkSurface_Gpu)
-
 ///////////////////////////////////////////////////////////////////////////////
 
 SkSurface_Gpu::SkSurface_Gpu(GrContext* ctx, const SkImageInfo& info,
diff --git a/images/SkImageDecoder.cpp b/images/SkImageDecoder.cpp
index 6bfd4f1..5fb3c72 100644
--- a/images/SkImageDecoder.cpp
+++ b/images/SkImageDecoder.cpp
@@ -14,10 +14,6 @@
 #include "SkTemplates.h"
 #include "SkCanvas.h"
 
-SK_DEFINE_INST_COUNT(SkImageDecoder::Peeker)
-SK_DEFINE_INST_COUNT(SkImageDecoder::Chooser)
-SK_DEFINE_INST_COUNT(SkImageDecoderFactory)
-
 static SkBitmap::Config gDeviceConfig = SkBitmap::kNo_Config;
 
 SkBitmap::Config SkImageDecoder::GetDeviceConfig()
diff --git a/images/SkMovie.cpp b/images/SkMovie.cpp
index d2439eb..9a2a71c 100644
--- a/images/SkMovie.cpp
+++ b/images/SkMovie.cpp
@@ -9,8 +9,6 @@
 #include "SkCanvas.h"
 #include "SkPaint.h"
 
-SK_DEFINE_INST_COUNT(SkMovie)
-
 // We should never see this in normal operation since our time values are
 // 0-based. So we use it as a sentinal.
 #define UNINITIALIZED_MSEC ((SkMSec)-1)
diff --git a/lazy/SkBitmapFactory.cpp b/lazy/SkBitmapFactory.cpp
index 1bbb6f0..17ecf47 100644
--- a/lazy/SkBitmapFactory.cpp
+++ b/lazy/SkBitmapFactory.cpp
@@ -13,8 +13,6 @@
 #include "SkImagePriv.h"
 #include "SkLazyPixelRef.h"
 
-SK_DEFINE_INST_COUNT(SkBitmapFactory::CacheSelector)
-
 SkBitmapFactory::SkBitmapFactory(SkBitmapFactory::DecodeProc proc)
     : fDecodeProc(proc)
     , fImageCache(NULL)
diff --git a/lazy/SkLruImageCache.cpp b/lazy/SkLruImageCache.cpp
index 40cfefa..26f7ef5 100644
--- a/lazy/SkLruImageCache.cpp
+++ b/lazy/SkLruImageCache.cpp
@@ -7,9 +7,6 @@
 
 #include "SkLruImageCache.h"
 
-SK_DEFINE_INST_COUNT(SkImageCache)
-SK_DEFINE_INST_COUNT(SkLruImageCache)
-
 static intptr_t NextGenerationID() {
     static intptr_t gNextID;
     do {
diff --git a/lazy/SkPurgeableImageCache.cpp b/lazy/SkPurgeableImageCache.cpp
index 0d36e4a..0f2c5e3 100644
--- a/lazy/SkPurgeableImageCache.cpp
+++ b/lazy/SkPurgeableImageCache.cpp
@@ -13,7 +13,6 @@
     #include "SkTSearch.h"
 #endif
 
-SK_DEFINE_INST_COUNT(SkPurgeableImageCache)
 SK_DECLARE_STATIC_MUTEX(gPurgeableImageMutex);
 
 SkImageCache* SkPurgeableImageCache::Create() {
diff --git a/pdf/SkPDFFont.h b/pdf/SkPDFFont.h
index f5d358f..694c69a 100644
--- a/pdf/SkPDFFont.h
+++ b/pdf/SkPDFFont.h
@@ -78,6 +78,7 @@
     reference to each instantiated class.
 */
 class SkPDFFont : public SkPDFDict {
+    SK_DECLARE_INST_COUNT(SkPDFFont)
 public:
     virtual ~SkPDFFont();
 
@@ -198,6 +199,7 @@
     // This should be made a hash table if performance is a problem.
     static SkTDArray<FontRec>& CanonicalFonts();
     static SkBaseMutex& CanonicalFontsMutex();
+    typedef SkPDFDict INHERITED;
 };
 
 #endif
diff --git a/pdf/SkPDFGraphicState.h b/pdf/SkPDFGraphicState.h
index 84c4291..9182efe 100644
--- a/pdf/SkPDFGraphicState.h
+++ b/pdf/SkPDFGraphicState.h
@@ -27,6 +27,7 @@
 
 */
 class SkPDFGraphicState : public SkPDFDict {
+    SK_DECLARE_INST_COUNT(SkPDFGraphicState)
 public:
     enum SkPDFSMaskMode {
         kAlpha_SMaskMode,
@@ -104,6 +105,7 @@
     static SkPDFObject* GetInvertFunction();
 
     static int Find(const SkPaint& paint);
+    typedef SkPDFDict INHERITED;
 };
 
 #endif
diff --git a/pdf/SkPDFPage.h b/pdf/SkPDFPage.h
index 2ce773c..47573c7 100644
--- a/pdf/SkPDFPage.h
+++ b/pdf/SkPDFPage.h
@@ -25,6 +25,7 @@
     tree and points to the content of the page.
 */
 class SkPDFPage : public SkPDFDict {
+    SK_DECLARE_INST_COUNT(SkPDFPage)
 public:
     /** Create a PDF page with the passed PDF device.  The device need not
      *  have content on it yet.
@@ -102,6 +103,7 @@
 
     // Once the content is finalized, put it into a stream for output.
     SkAutoTUnref<SkPDFStream> fContentStream;
+    typedef SkPDFDict INHERITED;
 };
 
 #endif
diff --git a/pdf/SkPDFResourceDict.cpp b/pdf/SkPDFResourceDict.cpp
index 6f5d167..8a0208d 100644
--- a/pdf/SkPDFResourceDict.cpp
+++ b/pdf/SkPDFResourceDict.cpp
@@ -8,8 +8,6 @@
 #include "SkPDFResourceDict.h"
 #include "SkPostConfig.h"
 
-SK_DEFINE_INST_COUNT(SkPDFResourceDict)
-
 // Sanity check that the values of enum SkPDFResourceType correspond to the
 // expected values as defined in the arrays below.
 // If these are failing, you may need to update the resource_type_prefixes
diff --git a/pdf/SkPDFResourceDict.h b/pdf/SkPDFResourceDict.h
index ab25b4a..17ea338 100644
--- a/pdf/SkPDFResourceDict.h
+++ b/pdf/SkPDFResourceDict.h
@@ -95,6 +95,7 @@
     SkTSet<SkPDFObject*> fResources;
 
     SkTDArray<SkPDFDict*> fTypes;
+    typedef SkPDFDict INHERITED;
 };
 
 #endif
diff --git a/pdf/SkPDFShader.cpp b/pdf/SkPDFShader.cpp
index 60992c3..94bdf2d 100644
--- a/pdf/SkPDFShader.cpp
+++ b/pdf/SkPDFShader.cpp
@@ -499,6 +499,7 @@
 };
 
 class SkPDFFunctionShader : public SkPDFDict, public SkPDFShader {
+    SK_DECLARE_INST_COUNT(SkPDFFunctionShader)
 public:
     explicit SkPDFFunctionShader(SkPDFShader::State* state);
     virtual ~SkPDFFunctionShader() {
@@ -524,6 +525,7 @@
     SkAutoTDelete<const SkPDFShader::State> fState;
 
     SkPDFStream* makePSFunction(const SkString& psCode, SkPDFArray* domain);
+    typedef SkPDFDict INHERITED;
 };
 
 /**
diff --git a/pdf/SkPDFStream.h b/pdf/SkPDFStream.h
index d7ff115..6371bc1 100644
--- a/pdf/SkPDFStream.h
+++ b/pdf/SkPDFStream.h
@@ -25,6 +25,7 @@
     is feasible.
 */
 class SkPDFStream : public SkPDFDict {
+    SK_DECLARE_INST_COUNT(SkPDFStream)
 public:
     /** Create a PDF stream. A Length entry is automatically added to the
      *  stream dictionary. The stream may be retained (stream->ref() may be
diff --git a/pdf/SkPDFTypes.cpp b/pdf/SkPDFTypes.cpp
index ed02d2b..55871c5 100644
--- a/pdf/SkPDFTypes.cpp
+++ b/pdf/SkPDFTypes.cpp
@@ -17,16 +17,6 @@
     #define SNPRINTF    snprintf
 #endif
 
-SK_DEFINE_INST_COUNT(SkPDFArray)
-SK_DEFINE_INST_COUNT(SkPDFBool)
-SK_DEFINE_INST_COUNT(SkPDFDict)
-SK_DEFINE_INST_COUNT(SkPDFInt)
-SK_DEFINE_INST_COUNT(SkPDFName)
-SK_DEFINE_INST_COUNT(SkPDFObject)
-SK_DEFINE_INST_COUNT(SkPDFObjRef)
-SK_DEFINE_INST_COUNT(SkPDFScalar)
-SK_DEFINE_INST_COUNT(SkPDFString)
-
 ///////////////////////////////////////////////////////////////////////////////
 
 void SkPDFObject::emit(SkWStream* stream, SkPDFCatalog* catalog,
diff --git a/text/SkTextLayout.cpp b/text/SkTextLayout.cpp
index 4e531cf..6f8bca5 100644
--- a/text/SkTextLayout.cpp
+++ b/text/SkTextLayout.cpp
@@ -7,8 +7,6 @@
  */
 #include "SkTextLayout.h"
 
-SK_DEFINE_INST_COUNT(SkTextStyle)
-
 SkTextStyle::SkTextStyle() {
     fPaint.setAntiAlias(true);
 }
diff --git a/utils/SkBoundaryPatch.cpp b/utils/SkBoundaryPatch.cpp
index fd1545d..e5fcc40 100644
--- a/utils/SkBoundaryPatch.cpp
+++ b/utils/SkBoundaryPatch.cpp
@@ -7,8 +7,6 @@
  */
 #include "SkBoundaryPatch.h"
 
-SK_DEFINE_INST_COUNT(SkBoundary)
-
 SkBoundaryPatch::SkBoundaryPatch() : fBoundary(NULL) {}
 
 SkBoundaryPatch::~SkBoundaryPatch() {
diff --git a/utils/SkDumpCanvas.cpp b/utils/SkDumpCanvas.cpp
index 0e1a232..dabf0d7 100644
--- a/utils/SkDumpCanvas.cpp
+++ b/utils/SkDumpCanvas.cpp
@@ -24,8 +24,6 @@
 #include "SkPathEffect.h"
 #include "SkMaskFilter.h"
 
-SK_DEFINE_INST_COUNT(SkDumpCanvas::Dumper)
-
 static void toString(const SkRect& r, SkString* str) {
     str->appendf("[%g,%g %g:%g]",
                  SkScalarToFloat(r.fLeft), SkScalarToFloat(r.fTop),
diff --git a/utils/SkLayer.cpp b/utils/SkLayer.cpp
index 126dd92..525917f 100644
--- a/utils/SkLayer.cpp
+++ b/utils/SkLayer.cpp
@@ -15,8 +15,6 @@
     static int gLayerAllocCount;
 #endif
 
-SK_DEFINE_INST_COUNT(SkLayer)
-
 ///////////////////////////////////////////////////////////////////////////////
 
 SkLayer::SkLayer() {
diff --git a/utils/SkUnitMappers.cpp b/utils/SkUnitMappers.cpp
index ceff9ca..5976e9d 100644
--- a/utils/SkUnitMappers.cpp
+++ b/utils/SkUnitMappers.cpp
@@ -8,8 +8,6 @@
 #include "SkUnitMappers.h"
 #include "SkFlattenableBuffers.h"
 
-SK_DEFINE_INST_COUNT(SkUnitMapper)
-
 SkDiscreteMapper::SkDiscreteMapper(int segments) {
     if (segments < 2) {
         fSegments = 0;
diff --git a/views/SkEventSink.cpp b/views/SkEventSink.cpp
index b6a3a6e..7763ade 100644
--- a/views/SkEventSink.cpp
+++ b/views/SkEventSink.cpp
@@ -14,8 +14,6 @@
 #include "SkThread.h"
 #include "SkTime.h"
 
-SK_DEFINE_INST_COUNT(SkEventSink)
-
 class SkEventSink_Globals {
 public:
     SkEventSink_Globals() {
diff --git a/views/SkView.cpp b/views/SkView.cpp
index e3e05f9..f211ad9 100644
--- a/views/SkView.cpp
+++ b/views/SkView.cpp
@@ -8,9 +8,6 @@
 #include "SkView.h"
 #include "SkCanvas.h"
 
-SK_DEFINE_INST_COUNT(SkView::Artist)
-SK_DEFINE_INST_COUNT(SkView::Layout)
-
 ////////////////////////////////////////////////////////////////////////
 
 SkView::SkView(uint32_t flags) : fFlags(SkToU8(flags))
diff --git a/views/animated/SkWidgetViews.cpp b/views/animated/SkWidgetViews.cpp
index 45e9868..8e7f517 100644
--- a/views/animated/SkWidgetViews.cpp
+++ b/views/animated/SkWidgetViews.cpp
@@ -24,8 +24,6 @@
 };
 */
 
-SK_DEFINE_INST_COUNT(SkListSource)
-
 const char* get_skin_enum_path(SkinEnum se)
 {
     SkASSERT((unsigned)se < kSkinEnumCount);