plumb SkInstCnt to all subclasses of GrRefCnt
git-svn-id: http://skia.googlecode.com/svn/trunk@4353 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
a23d048209
commit
fa35e3ddcc
@ -36,6 +36,8 @@ class GrSoftwarePathRenderer;
|
||||
|
||||
class GR_API GrContext : public GrRefCnt {
|
||||
public:
|
||||
SK_DECLARE_INST_COUNT(GrContext)
|
||||
|
||||
/**
|
||||
* Creates a GrContext from within a 3D context.
|
||||
*/
|
||||
@ -787,6 +789,8 @@ private:
|
||||
// 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;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -25,12 +25,17 @@ class SkPath;
|
||||
*/
|
||||
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
|
||||
|
@ -15,6 +15,8 @@
|
||||
|
||||
class GrKey : public GrRefCnt {
|
||||
public:
|
||||
SK_DECLARE_INST_COUNT(GrKey)
|
||||
|
||||
typedef intptr_t Hash;
|
||||
|
||||
explicit GrKey(Hash hash) : fHash(hash) {}
|
||||
@ -34,6 +36,8 @@ protected:
|
||||
|
||||
private:
|
||||
const Hash fHash;
|
||||
|
||||
typedef GrRefCnt INHERITED;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -32,6 +32,8 @@ protected:
|
||||
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.
|
||||
|
@ -27,6 +27,9 @@
|
||||
#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
|
||||
|
@ -21,8 +21,9 @@
|
||||
|
||||
|
||||
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
|
||||
@ -879,6 +880,7 @@ private:
|
||||
// only compared if the color matrix enable flag is set
|
||||
float fColorMatrix[20]; // 5 x 4 matrix
|
||||
|
||||
typedef GrRefCnt INHERITED;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -15,6 +15,8 @@
|
||||
#include "GrTexture.h"
|
||||
#include "GrVertexBuffer.h"
|
||||
|
||||
SK_DEFINE_INST_COUNT(GrDrawTarget)
|
||||
|
||||
namespace {
|
||||
|
||||
/**
|
||||
|
@ -27,6 +27,8 @@ class GrVertexBuffer;
|
||||
|
||||
class GrDrawTarget : public GrRefCnt {
|
||||
public:
|
||||
SK_DECLARE_INST_COUNT(GrDrawTarget)
|
||||
|
||||
/**
|
||||
* Represents the draw target capabilities.
|
||||
*/
|
||||
@ -1065,7 +1067,8 @@ private:
|
||||
};
|
||||
SkSTArray<kPreallocGeoSrcStateStackCnt,
|
||||
GeometrySrcState, true> fGeoSrcStateStack;
|
||||
|
||||
|
||||
typedef GrRefCnt INHERITED;
|
||||
};
|
||||
|
||||
GR_MAKE_BITFIELD_OPS(GrDrawTarget::BlendOptFlags);
|
||||
|
@ -8,6 +8,8 @@
|
||||
|
||||
#include "GrPathRenderer.h"
|
||||
|
||||
SK_DEFINE_INST_COUNT(GrPathRenderer)
|
||||
|
||||
GrPathRenderer::GrPathRenderer() {
|
||||
}
|
||||
|
||||
|
@ -28,6 +28,7 @@ struct GrPoint;
|
||||
*/
|
||||
class GR_API GrPathRenderer : public GrRefCnt {
|
||||
public:
|
||||
SK_DECLARE_INST_COUNT(GrPathRenderer)
|
||||
|
||||
/**
|
||||
* This is called to install custom path renderers in every GrContext at
|
||||
|
@ -15,6 +15,11 @@
|
||||
#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;
|
||||
|
@ -23,6 +23,8 @@
|
||||
#include "SkTLazy.h"
|
||||
#include "SkUtils.h"
|
||||
|
||||
SK_DEFINE_INST_COUNT(GrTextContext)
|
||||
|
||||
#define CACHE_COMPATIBLE_DEVICE_TEXTURES 1
|
||||
|
||||
#if 0
|
||||
|
@ -5,11 +5,11 @@
|
||||
* 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)
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user