diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-10-14 20:02:44 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-10-14 20:02:44 +0000 |
commit | 0cd2ac6c721120a2628524dad91798aa3e7ec41d (patch) | |
tree | e74814132e499fdbb2fcb74c325b316da1a2a557 /include/core | |
parent | ea476e1725f38688b79aadf4c5e36c10c3141927 (diff) |
change SkAnnotation to not inherit from SkFlattenable (does not need dynamic factories)
BUG=
R=scroggo@google.com
Review URL: https://codereview.chromium.org/26606004
git-svn-id: http://skia.googlecode.com/svn/trunk@11762 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core')
-rw-r--r-- | include/core/SkAnnotation.h | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/include/core/SkAnnotation.h b/include/core/SkAnnotation.h index 83256ddb0e..9814f8f76f 100644 --- a/include/core/SkAnnotation.h +++ b/include/core/SkAnnotation.h @@ -8,10 +8,12 @@ #ifndef SkAnnotation_DEFINED #define SkAnnotation_DEFINED -#include "SkFlattenable.h" +#include "SkRefCnt.h" #include "SkString.h" class SkData; +class SkFlattenableReadBuffer; +class SkFlattenableWriteBuffer; class SkStream; class SkWStream; struct SkPoint; @@ -20,7 +22,7 @@ struct SkPoint; * Experimental class for annotating draws. Do not use directly yet. * Use helper functions at the bottom of this file for now. */ -class SkAnnotation : public SkFlattenable { +class SkAnnotation : public SkRefCnt { public: enum Flags { // If set, the associated drawing primitive should not be drawn @@ -39,21 +41,15 @@ public: */ SkData* find(const char key[]) const; - SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkAnnotation) - -protected: SkAnnotation(SkFlattenableReadBuffer&); - virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE; + void writeToBuffer(SkFlattenableWriteBuffer&) const; private: SkString fKey; SkData* fData; uint32_t fFlags; - void writeToStream(SkWStream*) const; - void readFromStream(SkStream*); - - typedef SkFlattenable INHERITED; + typedef SkRefCnt INHERITED; }; /** |