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/SampleTextEffects.cpp b/samplecode/SampleTextEffects.cpp
index 6eadffd..e6bca82 100644
--- a/samplecode/SampleTextEffects.cpp
+++ b/samplecode/SampleTextEffects.cpp
@@ -189,11 +189,11 @@
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) {
@@ -218,10 +218,6 @@
private:
SkScalar fWidth;
- static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) {
- return new Line2DPathEffect(buffer);
- }
-
typedef Sk2DPathEffect INHERITED;
};