Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(345)

Unified Diff: samplecode/ClockFaceView.cpp

Issue 395603002: Simplify flattening to just write enough to call the factory (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: samplecode/ClockFaceView.cpp
diff --git a/samplecode/ClockFaceView.cpp b/samplecode/ClockFaceView.cpp
index a887cc67fd084774c5129aa7fb20ea1c21f32d67..a59d16efafa874d81e109d802ebfc3fe8e1481c9 100644
--- a/samplecode/ClockFaceView.cpp
+++ b/samplecode/ClockFaceView.cpp
@@ -119,12 +119,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);

Powered by Google App Engine
This is Rietveld 408576698