Index: samplecode/ClockFaceView.cpp |
diff --git a/samplecode/ClockFaceView.cpp b/samplecode/ClockFaceView.cpp |
index a887cc67fd084774c5129aa7fb20ea1c21f32d67..46d4120c9b35710983f18025abf019699c44b903 100644 |
--- a/samplecode/ClockFaceView.cpp |
+++ b/samplecode/ClockFaceView.cpp |
@@ -90,13 +90,15 @@ protected: |
dst->addCircle(loc.fX, loc.fY, fRadius); |
} |
+#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING |
Dot2DPathEffect(SkReadBuffer& buffer) : INHERITED(buffer) { |
fRadius = buffer.readScalar(); |
fPts = NULL; |
} |
+#endif |
virtual void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE { |
- this->INHERITED::flatten(buffer); |
+ buffer.writeMatrix(this->getMatrix()); |
buffer.writeScalar(fRadius); |
} |
@@ -107,6 +109,12 @@ private: |
typedef Sk2DPathEffect INHERITED; |
}; |
+SkFlattenable* Dot2DPathEffect::CreateProc(SkReadBuffer& buffer) { |
+ SkMatrix matrix; |
+ buffer.readMatrix(&matrix); |
+ return SkNEW_ARGS(Dot2DPathEffect, (buffer.readScalar(), matrix, NULL)); |
+} |
+ |
class InverseFillPE : public SkPathEffect { |
public: |
InverseFillPE() {} |
@@ -119,12 +127,19 @@ public: |
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(InverseFillPE) |
protected: |
+#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING |
InverseFillPE(SkReadBuffer& buffer) : INHERITED(buffer) {} |
+#endif |
+ |
private: |
typedef SkPathEffect INHERITED; |
}; |
+SkFlattenable* InverseFillPE::CreateProc(SkReadBuffer& buffer) { |
+ return SkNEW(InverseFillPE); |
+} |
+ |
static SkPathEffect* makepe(float interp, SkTDArray<SkPoint>* pts) { |
SkMatrix lattice; |
SkScalar rad = 3 + SkIntToScalar(4) * (1 - interp); |