Index: include/effects/SkColorMatrixFilter.h |
diff --git a/include/effects/SkColorMatrixFilter.h b/include/effects/SkColorMatrixFilter.h |
index a4144e17175dcd765aaaf022de52df7dd186aeca..785d682c991550141dc8bdcbe628850033035e1d 100644 |
--- a/include/effects/SkColorMatrixFilter.h |
+++ b/include/effects/SkColorMatrixFilter.h |
@@ -13,8 +13,12 @@ |
class SK_API SkColorMatrixFilter : public SkColorFilter { |
public: |
- explicit SkColorMatrixFilter(const SkColorMatrix&); |
- SkColorMatrixFilter(const SkScalar array[20]); |
+ static SkColorMatrixFilter* Create(const SkColorMatrix& cm) { |
+ return SkNEW_ARGS(SkColorMatrixFilter, (cm)); |
+ } |
+ static SkColorMatrixFilter* Create(const SkScalar array[20]) { |
+ return SkNEW_ARGS(SkColorMatrixFilter, (array)); |
+ } |
// overrides from SkColorFilter |
virtual void filterSpan(const SkPMColor src[], int count, SkPMColor[]) const SK_OVERRIDE; |
@@ -38,6 +42,12 @@ protected: |
SkColorMatrixFilter(SkReadBuffer& buffer); |
virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; |
+#ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS |
+public: |
+#endif |
+ explicit SkColorMatrixFilter(const SkColorMatrix&); |
+ SkColorMatrixFilter(const SkScalar array[20]); |
+ |
private: |
SkColorMatrix fMatrix; |