diff options
author | 2012-03-26 17:57:35 +0000 | |
---|---|---|
committer | 2012-03-26 17:57:35 +0000 | |
commit | ba28d03e94dc221d6a803bf2a84a420b9159255c (patch) | |
tree | 1130187c2342abd92cc0782e724ad57fc551872a /samplecode/SampleSlides.cpp | |
parent | d43b0a87f85ca26ec771e094c62df33b0537b563 (diff) |
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
Diffstat (limited to 'samplecode/SampleSlides.cpp')
-rw-r--r-- | samplecode/SampleSlides.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/samplecode/SampleSlides.cpp b/samplecode/SampleSlides.cpp index 9b72afb726..3c656e9b0d 100644 --- a/samplecode/SampleSlides.cpp +++ b/samplecode/SampleSlides.cpp @@ -612,12 +612,13 @@ public: 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 @@ protected: private: SkScalar fWidth; - static SkFlattenable* CreateProc(SkFlattenableReadBuffer& buffer) - { - return new Line2DPathEffect(buffer); - } - typedef Sk2DPathEffect INHERITED; }; |