From fa35e3ddcc9d130ce87c927218bdf27879c38711 Mon Sep 17 00:00:00 2001 From: "reed@google.com" Date: Tue, 26 Jun 2012 20:16:17 +0000 Subject: plumb SkInstCnt to all subclasses of GrRefCnt git-svn-id: http://skia.googlecode.com/svn/trunk@4353 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/gpu/gl/GrGLTexture.cpp | 4 ++-- src/gpu/gl/GrGLTexture.h | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src/gpu/gl') diff --git a/src/gpu/gl/GrGLTexture.cpp b/src/gpu/gl/GrGLTexture.cpp index 476d3e7e41..9c6743a3b8 100644 --- a/src/gpu/gl/GrGLTexture.cpp +++ b/src/gpu/gl/GrGLTexture.cpp @@ -5,11 +5,11 @@ * found in the LICENSE file. */ - #include "GrGLTexture.h" - #include "GrGpuGL.h" +SK_DEFINE_INST_COUNT(GrGLTexID) + #define GPUGL static_cast(getGpu()) #define GL_CALL(X) GR_GL_CALL(GPUGL->glInterface(), X) diff --git a/src/gpu/gl/GrGLTexture.h b/src/gpu/gl/GrGLTexture.h index e408e5db94..8e8c8c5da4 100644 --- a/src/gpu/gl/GrGLTexture.h +++ b/src/gpu/gl/GrGLTexture.h @@ -16,8 +16,9 @@ * A ref counted tex id that deletes the texture in its destructor. */ class GrGLTexID : public GrRefCnt { - public: + SK_DECLARE_INST_COUNT(GrGLTexID) + GrGLTexID(const GrGLInterface* gl, GrGLuint texID, bool ownsID) : fGL(gl) , fTexID(texID) @@ -37,6 +38,8 @@ private: const GrGLInterface* fGL; GrGLuint fTexID; bool fOwnsID; + + typedef GrRefCnt INHERITED; }; //////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3