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/samplecode/SampleSlides.cpp b/samplecode/SampleSlides.cpp
index 9b72afb..3c656e9 100644
--- a/samplecode/SampleSlides.cpp
+++ b/samplecode/SampleSlides.cpp
@@ -612,12 +612,13 @@
         return false;
     }
     
-    virtual Factory getFactory() { return CreateProc; }
     virtual void flatten(SkFlattenableWriteBuffer& buffer)
     {
         this->INHERITED::flatten(buffer);
         buffer.writeScalar(fWidth);
     }
+
+    SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(Line2DPathEffect)
 protected:
 	virtual void nextSpan(int u, int v, int ucount, SkPath* dst)
     {
@@ -644,11 +645,6 @@
 private:
     SkScalar fWidth;
     
-    static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer)
-    {
-        return new Line2DPathEffect(buffer);
-    }
-    
     typedef Sk2DPathEffect INHERITED;
 };