diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-06-26 15:30:08 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-06-26 15:30:08 +0000 |
commit | 3b429984664e88e0530eb6a1461a828898d8d96b (patch) | |
tree | 5e2576a82b51958ec5a9cbb19a48a67248e81b45 /src/pdf/SkPDFTypes.h | |
parent | 0833777df1f05adafd9b70c666a72d80defa4f6b (diff) |
stick SkInstCnt in more classes, to help track down leaks
git-svn-id: http://skia.googlecode.com/svn/trunk@4341 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/pdf/SkPDFTypes.h')
-rw-r--r-- | src/pdf/SkPDFTypes.h | 37 |
1 files changed, 32 insertions, 5 deletions
diff --git a/src/pdf/SkPDFTypes.h b/src/pdf/SkPDFTypes.h index d5fe4ae72c..7d249408d1 100644 --- a/src/pdf/SkPDFTypes.h +++ b/src/pdf/SkPDFTypes.h @@ -29,11 +29,6 @@ class SkPDFObject : public SkRefCnt { public: SK_DECLARE_INST_COUNT(SkPDFObject) - /** Create a PDF object. - */ - SkPDFObject(); - virtual ~SkPDFObject(); - /** Return the size (number of bytes) of this object in the final output * file. Compound objects or objects that are computationally intensive * to output should override this method. @@ -103,6 +98,8 @@ protected: */ class SkPDFObjRef : public SkPDFObject { public: + SK_DECLARE_INST_COUNT(SkPDFObjRef) + /** Create a reference to an existing SkPDFObject. * @param obj The object to reference. */ @@ -116,6 +113,8 @@ public: private: SkRefPtr<SkPDFObject> fObj; + + typedef SkPDFObject INHERITED; }; /** \class SkPDFInt @@ -124,6 +123,8 @@ private: */ class SkPDFInt : public SkPDFObject { public: + SK_DECLARE_INST_COUNT(SkPDFInt) + /** Create a PDF integer (usually for indirect reference purposes). * @param value An integer value between 2^31 - 1 and -2^31. */ @@ -136,6 +137,8 @@ public: private: int32_t fValue; + + typedef SkPDFObject INHERITED; }; /** \class SkPDFBool @@ -144,6 +147,8 @@ private: */ class SkPDFBool : public SkPDFObject { public: + SK_DECLARE_INST_COUNT(SkPDFBool) + /** Create a PDF boolean. * @param value true or false. */ @@ -157,6 +162,8 @@ public: private: bool fValue; + + typedef SkPDFObject INHERITED; }; /** \class SkPDFScalar @@ -165,6 +172,8 @@ private: */ class SkPDFScalar : public SkPDFObject { public: + SK_DECLARE_INST_COUNT(SkPDFScalar) + /** Create a PDF real number. * @param value A real value. */ @@ -179,6 +188,8 @@ public: private: SkScalar fValue; + + typedef SkPDFObject INHERITED; }; /** \class SkPDFString @@ -187,6 +198,8 @@ private: */ class SkPDFString : public SkPDFObject { public: + SK_DECLARE_INST_COUNT(SkPDFString) + /** Create a PDF string. Maximum length (in bytes) is 65,535. * @param value A string value. */ @@ -217,6 +230,8 @@ private: static SkString DoFormatString(const void* input, size_t len, bool wideInput, bool wideOutput); + + typedef SkPDFObject INHERITED; }; /** \class SkPDFName @@ -225,6 +240,8 @@ private: */ class SkPDFName : public SkPDFObject { public: + SK_DECLARE_INST_COUNT(SkPDFName) + /** Create a PDF name object. Maximum length is 127 bytes. * @param value The name. */ @@ -245,6 +262,8 @@ private: const SkString fValue; static SkString FormatName(const SkString& input); + + typedef SkPDFObject INHERITED; }; /** \class SkPDFArray @@ -253,6 +272,8 @@ private: */ class SkPDFArray : public SkPDFObject { public: + SK_DECLARE_INST_COUNT(SkPDFArray) + /** Create a PDF array. Maximum length is 8191. */ SkPDFArray(); @@ -308,6 +329,8 @@ public: private: static const int kMaxLen = 8191; SkTDArray<SkPDFObject*> fValue; + + typedef SkPDFObject INHERITED; }; /** \class SkPDFDict @@ -316,6 +339,8 @@ private: */ class SkPDFDict : public SkPDFObject { public: + SK_DECLARE_INST_COUNT(SkPDFDict) + /** Create a PDF dictionary. Maximum number of entries is 4095. */ SkPDFDict(); @@ -402,6 +427,8 @@ private: static const int kMaxLen = 4095; SkTDArray<struct Rec> fValue; + + typedef SkPDFObject INHERITED; }; #endif |