Create macro for registering classes for deserialization
Review URL: https://codereview.appspot.com/5909063

git-svn-id: http://skia.googlecode.com/svn/trunk@3494 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/animator/SkDrawExtraPathEffect.cpp b/src/animator/SkDrawExtraPathEffect.cpp
index 12e0368..c901df3 100644
--- a/src/animator/SkDrawExtraPathEffect.cpp
+++ b/src/animator/SkDrawExtraPathEffect.cpp
@@ -91,6 +91,8 @@
         fDraw(draw), fMaker(maker) {
     }
 
+    SK_DECLARE_UNFLATTENABLE_OBJECT()
+
 protected:
     virtual SkScalar begin(SkScalar contourLength)
     {
@@ -139,7 +141,6 @@
 
 private:
     virtual void flatten(SkFlattenableWriteBuffer& ) {}
-    virtual Factory getFactory() { return NULL; }
 
     static bool GetContourLength(const char* token, size_t len, void* clen, SkScriptValue* value) {
         if (SK_LITERAL_STR_EQUAL("contourLength", token, len)) {
diff --git a/src/animator/SkDrawGradient.cpp b/src/animator/SkDrawGradient.cpp
index 37fc7e8..2cad722 100644
--- a/src/animator/SkDrawGradient.cpp
+++ b/src/animator/SkDrawGradient.cpp
@@ -35,8 +35,7 @@
     SkGradientUnitMapper(SkAnimateMaker* maker, const char* script) : fMaker(maker), fScript(script) {
     }
     
-    // overrides for SkFlattenable
-    virtual Factory getFactory() { return NULL; }
+    SK_DECLARE_UNFLATTENABLE_OBJECT()
     
 protected:
     virtual uint16_t mapUnit16(uint16_t x) {