class GR_API GrContext : public GrRefCnt {
public:
+ SK_DECLARE_INST_COUNT(GrContext)
+
/**
* Creates a GrContext from within a 3D context.
*/
// 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;
};
/**
*/
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
class GrKey : public GrRefCnt {
public:
+ SK_DECLARE_INST_COUNT(GrKey)
+
typedef intptr_t Hash;
explicit GrKey(Hash hash) : fHash(hash) {}
private:
const Hash fHash;
+
+ typedef GrRefCnt INHERITED;
};
#endif
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.
#include "SkTLS.h"
#include "SkTrace.h"
+SK_DEFINE_INST_COUNT(GrContext)
+SK_DEFINE_INST_COUNT(GrDrawState)
+
#define DEFER_TEXT_RENDERING 1
#define DEFER_PATHS 1
class GrDrawState : public GrRefCnt {
-
public:
+ SK_DECLARE_INST_COUNT(GrDrawState)
+
/**
* Number of texture stages. Each stage takes as input a color and
* 2D texture coordinates. The color input to the first enabled stage is the
// only compared if the color matrix enable flag is set
float fColorMatrix[20]; // 5 x 4 matrix
+ typedef GrRefCnt INHERITED;
};
#endif
#include "GrTexture.h"
#include "GrVertexBuffer.h"
+SK_DEFINE_INST_COUNT(GrDrawTarget)
+
namespace {
/**
class GrDrawTarget : public GrRefCnt {
public:
+ SK_DECLARE_INST_COUNT(GrDrawTarget)
+
/**
* Represents the draw target capabilities.
*/
};
SkSTArray<kPreallocGeoSrcStateStackCnt,
GeometrySrcState, true> fGeoSrcStateStack;
-
+
+ typedef GrRefCnt INHERITED;
};
GR_MAKE_BITFIELD_OPS(GrDrawTarget::BlendOptFlags);
#include "GrPathRenderer.h"
+SK_DEFINE_INST_COUNT(GrPathRenderer)
+
GrPathRenderer::GrPathRenderer() {
}
*/
class GR_API GrPathRenderer : public GrRefCnt {
public:
+ SK_DECLARE_INST_COUNT(GrPathRenderer)
/**
* This is called to install custom path renderers in every GrContext at
#include "GrTextStrike_impl.h"
#include "GrRect.h"
+SK_DEFINE_INST_COUNT(GrFontScaler)
+SK_DEFINE_INST_COUNT(GrKey)
+
+///////////////////////////////////////////////////////////////////////////////
+
GrFontCache::GrFontCache(GrGpu* gpu) : fGpu(gpu) {
gpu->ref();
fAtlasMgr = NULL;
#include "SkTLazy.h"
#include "SkUtils.h"
+SK_DEFINE_INST_COUNT(GrTextContext)
+
#define CACHE_COMPATIBLE_DEVICE_TEXTURES 1
#if 0
* found in the LICENSE file.
*/
-
#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)
* 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)
const GrGLInterface* fGL;
GrGLuint fTexID;
bool fOwnsID;
+
+ typedef GrRefCnt INHERITED;
};
////////////////////////////////////////////////////////////////////////////////