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

Unified Diff: include/core/SkAnnotation.h

Issue 26606004: change SkAnnotation to not inherit from SkFlattenable (does not need dynamic factories) (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 | « no previous file | src/core/SkAnnotation.cpp » ('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 83256ddb0e32161f218d031304e79f0938a26a6a..9814f8f76fde45280c7f93949ffca657987ff2f3 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;
};
/**
« no previous file with comments | « no previous file | src/core/SkAnnotation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698