Index: include/effects/SkDisplacementMapEffect.h |
diff --git a/include/effects/SkDisplacementMapEffect.h b/include/effects/SkDisplacementMapEffect.h |
index 5de4814951a6afb0f299ed90a1db9bf24b8e3e5c..59549dc7184dd3fd9bfdfb2e1244f6d6cabfb6ff 100644 |
--- a/include/effects/SkDisplacementMapEffect.h |
+++ b/include/effects/SkDisplacementMapEffect.h |
@@ -18,18 +18,20 @@ public: |
kR_ChannelSelectorType, |
kG_ChannelSelectorType, |
kB_ChannelSelectorType, |
- kA_ChannelSelectorType, |
- kKeyBits = 3 // Max value is 4, so 3 bits are required at most |
+ kA_ChannelSelectorType |
}; |
- SkDisplacementMapEffect(ChannelSelectorType xChannelSelector, |
- ChannelSelectorType yChannelSelector, |
- SkScalar scale, SkImageFilter* displacement, |
- SkImageFilter* color = NULL, |
- const CropRect* cropRect = NULL); |
- |
~SkDisplacementMapEffect(); |
+ static SkDisplacementMapEffect* Create(ChannelSelectorType xChannelSelector, |
+ ChannelSelectorType yChannelSelector, |
+ SkScalar scale, SkImageFilter* displacement, |
+ SkImageFilter* color = NULL, |
+ const CropRect* cropRect = NULL) { |
+ return SkNEW_ARGS(SkDisplacementMapEffect, (xChannelSelector, yChannelSelector, scale, |
+ displacement, color, cropRect)); |
+ } |
+ |
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDisplacementMapEffect) |
virtual bool onFilterImage(Proxy* proxy, |
@@ -52,6 +54,15 @@ protected: |
explicit SkDisplacementMapEffect(SkReadBuffer& buffer); |
virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; |
+#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS |
+public: |
+#endif |
+ SkDisplacementMapEffect(ChannelSelectorType xChannelSelector, |
+ ChannelSelectorType yChannelSelector, |
+ SkScalar scale, SkImageFilter* displacement, |
+ SkImageFilter* color = NULL, |
+ const CropRect* cropRect = NULL); |
+ |
private: |
ChannelSelectorType fXChannelSelector; |
ChannelSelectorType fYChannelSelector; |