aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkAnnotation.h
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-10-14 16:49:15 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-10-14 16:49:15 +0000
commit4979f32cd3fd29db5f23712f0aea3cf01a5c695d (patch)
tree0ef15030cea69e7260d6545dbd62e023a75ce346 /include/core/SkAnnotation.h
parent790c3f4e095c57b1e2412a46e7d71f28babf07c8 (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.h12
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;