Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: include/core/SkAnnotation.h

Issue 27208002: remove SkDataSet, and just store a key/value in SkAnnotation (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gyp/public_headers.gypi ('k') | include/core/SkDataSet.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkAnnotation.h
diff --git a/include/core/SkAnnotation.h b/include/core/SkAnnotation.h
index 18ee1cd1a65993eaf2cdf5f203bfd7fe455b7a6b..83256ddb0e32161f218d031304e79f0938a26a6a 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;
« no previous file with comments | « gyp/public_headers.gypi ('k') | include/core/SkDataSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698