diff options
author | 2013-10-14 16:49:15 +0000 | |
---|---|---|
committer | 2013-10-14 16:49:15 +0000 | |
commit | 4979f32cd3fd29db5f23712f0aea3cf01a5c695d (patch) | |
tree | 0ef15030cea69e7260d6545dbd62e023a75ce346 /include/core/SkAnnotation.h | |
parent | 790c3f4e095c57b1e2412a46e7d71f28babf07c8 (diff) |
remove SkDataSet, and just store a key/value in SkAnnotation
BUG=
R=mtklein@google.com
Review URL: https://codereview.chromium.org/27208002
git-svn-id: http://skia.googlecode.com/svn/trunk@11759 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core/SkAnnotation.h')
-rw-r--r-- | include/core/SkAnnotation.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/core/SkAnnotation.h b/include/core/SkAnnotation.h index 18ee1cd1a6..83256ddb0e 100644 --- a/include/core/SkAnnotation.h +++ b/include/core/SkAnnotation.h @@ -9,9 +9,9 @@ #define SkAnnotation_DEFINED #include "SkFlattenable.h" +#include "SkString.h" class SkData; -class SkDataSet; class SkStream; class SkWStream; struct SkPoint; @@ -27,18 +27,17 @@ public: kNoDraw_Flag = 1 << 0, }; - SkAnnotation(SkDataSet*, uint32_t flags); + SkAnnotation(const char key[], SkData* value, uint32_t flags); virtual ~SkAnnotation(); uint32_t getFlags() const { return fFlags; } - SkDataSet* getDataSet() const { return fDataSet; } bool isNoDraw() const { return SkToBool(fFlags & kNoDraw_Flag); } /** - * Helper for search the annotation's dataset. + * Return the data for the specified key, or NULL. */ - SkData* find(const char name[]) const; + SkData* find(const char key[]) const; SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkAnnotation) @@ -47,7 +46,8 @@ protected: virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE; private: - SkDataSet* fDataSet; + SkString fKey; + SkData* fData; uint32_t fFlags; void writeToStream(SkWStream*) const; |