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

Unified Diff: include/core/SkFlattenable.h

Issue 22799007: I'm investigating how to make the IPC transfer a bit more secure on the (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Windows error fix Created 7 years, 4 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/SampleApp.gyp ('k') | include/core/SkFlattenableSerialization.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkFlattenable.h
diff --git a/include/core/SkFlattenable.h b/include/core/SkFlattenable.h
index 0b21abcc764c7aed2bd67f9a83c5162df3e222a9..181d2857e858ef7be55b1d16af827f168f0debec 100644
--- a/include/core/SkFlattenable.h
+++ b/include/core/SkFlattenable.h
@@ -27,7 +27,7 @@ class SkFlattenableWriteBuffer;
}
#define SK_DECLARE_UNFLATTENABLE_OBJECT() \
- virtual Factory getFactory() SK_OVERRIDE { return NULL; }; \
+ virtual Factory getFactory() SK_OVERRIDE { return NULL; }
#define SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(flattenable) \
virtual Factory getFactory() SK_OVERRIDE { return CreateProc; } \
@@ -45,6 +45,8 @@ class SK_API SkFlattenable : public SkRefCnt {
public:
SK_DECLARE_INST_COUNT(SkFlattenable)
+ enum Type { FLATTENABLE, IMAGE_FILTER };
+
typedef SkFlattenable* (*Factory)(SkFlattenableReadBuffer&);
SkFlattenable() {}
@@ -54,6 +56,7 @@ public:
override of flatten().
*/
virtual Factory getFactory() = 0;
+ virtual bool isA(Type type) const { return FLATTENABLE == type; }
static Factory NameToFactory(const char name[]);
static const char* FactoryToName(Factory);
« no previous file with comments | « gyp/SampleApp.gyp ('k') | include/core/SkFlattenableSerialization.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698