aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm
diff options
context:
space:
mode:
Diffstat (limited to 'gm')
-rw-r--r--gm/imagefiltersbase.cpp16
-rw-r--r--gm/imagefiltersgraph.cpp12
2 files changed, 28 insertions, 0 deletions
diff --git a/gm/imagefiltersbase.cpp b/gm/imagefiltersbase.cpp
index 749334a61e..4546b8add2 100644
--- a/gm/imagefiltersbase.cpp
+++ b/gm/imagefiltersbase.cpp
@@ -22,7 +22,11 @@ public:
public:
Registrar() {
SkFlattenable::Register("FailImageFilter",
+#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
+ FailImageFilter::DeepCreateProc,
+#else
FailImageFilter::CreateProc,
+#endif
FailImageFilter::GetFlattenableType());
}
};
@@ -40,6 +44,10 @@ protected:
return false;
}
+#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
+ FailImageFilter(SkReadBuffer& buffer) : INHERITED(0, buffer) {}
+#endif
+
private:
typedef SkImageFilter INHERITED;
};
@@ -57,7 +65,11 @@ public:
public:
Registrar() {
SkFlattenable::Register("IdentityImageFilter",
+#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
+ IdentityImageFilter::DeepCreateProc,
+#else
IdentityImageFilter::CreateProc,
+#endif
IdentityImageFilter::GetFlattenableType());
}
};
@@ -76,6 +88,10 @@ protected:
return true;
}
+#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
+ IdentityImageFilter(SkReadBuffer& buffer) : INHERITED(1, buffer) {}
+#endif
+
private:
typedef SkImageFilter INHERITED;
};
diff --git a/gm/imagefiltersgraph.cpp b/gm/imagefiltersgraph.cpp
index 8469a43b59..8af268e568 100644
--- a/gm/imagefiltersgraph.cpp
+++ b/gm/imagefiltersgraph.cpp
@@ -29,7 +29,11 @@ public:
public:
Registrar() {
SkFlattenable::Register("SimpleOffsetFilter",
+#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
+ SimpleOffsetFilter::DeepCreateProc,
+#else
SimpleOffsetFilter::CreateProc,
+#endif
SimpleOffsetFilter::GetFlattenableType());
}
};
@@ -65,6 +69,14 @@ public:
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SimpleOffsetFilter);
protected:
+#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
+ explicit SimpleOffsetFilter(SkReadBuffer& buffer)
+ : SkImageFilter(1, buffer) {
+ fDX = buffer.readScalar();
+ fDY = buffer.readScalar();
+ }
+#endif
+
virtual void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE {
this->INHERITED::flatten(buffer);
buffer.writeScalar(fDX);