Chromium Code Reviews| Index: include/core/SkPathEffect.h |
| diff --git a/include/core/SkPathEffect.h b/include/core/SkPathEffect.h |
| index 3f38f3a101a52e0889662f8ed38ab192ae0b99be..10d8118a8658f8d9cc06a64a6e29e1e618f60018 100644 |
| --- a/include/core/SkPathEffect.h |
| +++ b/include/core/SkPathEffect.h |
| @@ -31,8 +31,6 @@ class SK_API SkPathEffect : public SkFlattenable { |
| public: |
| SK_DECLARE_INST_COUNT(SkPathEffect) |
| - SkPathEffect() {} |
| - |
| /** |
| * Given a src path (input) and a stroke-rec (input and output), apply |
| * this effect to the src path, returning the new path in dst, and return |
| @@ -109,6 +107,7 @@ public: |
| SK_DEFINE_FLATTENABLE_TYPE(SkPathEffect) |
| protected: |
| + SkPathEffect() {} |
|
scroggo
2014/02/18 16:53:11
I guess the constructors that aren't public behind
Dominik Grewe
2014/02/18 17:05:30
Yes. I've patched this into Chrome and it's workin
|
| SkPathEffect(SkReadBuffer& buffer) : INHERITED(buffer) {} |
| private: |
| @@ -127,10 +126,10 @@ private: |
| */ |
| class SkPairPathEffect : public SkPathEffect { |
| public: |
| - SkPairPathEffect(SkPathEffect* pe0, SkPathEffect* pe1); |
| virtual ~SkPairPathEffect(); |
| protected: |
| + SkPairPathEffect(SkPathEffect* pe0, SkPathEffect* pe1); |
| SkPairPathEffect(SkReadBuffer&); |
| virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; |
| @@ -153,8 +152,9 @@ public: |
| The reference counts for outer and inner are both incremented in the constructor, |
| and decremented in the destructor. |
| */ |
| - SkComposePathEffect(SkPathEffect* outer, SkPathEffect* inner) |
| - : INHERITED(outer, inner) {} |
| + static SkComposePathEffect* Create(SkPathEffect* outer, SkPathEffect* inner) { |
| + return SkNEW_ARGS(SkComposePathEffect, (outer, inner)); |
| + } |
| virtual bool filterPath(SkPath* dst, const SkPath& src, |
| SkStrokeRec*, const SkRect*) const SK_OVERRIDE; |
| @@ -162,6 +162,8 @@ public: |
| SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkComposePathEffect) |
| protected: |
| + SkComposePathEffect(SkPathEffect* outer, SkPathEffect* inner) |
| + : INHERITED(outer, inner) {} |
| SkComposePathEffect(SkReadBuffer& buffer) : INHERITED(buffer) {} |
| private: |
| @@ -184,8 +186,9 @@ public: |
| The reference counts for first and second are both incremented in the constructor, |
| and decremented in the destructor. |
| */ |
| - SkSumPathEffect(SkPathEffect* first, SkPathEffect* second) |
| - : INHERITED(first, second) {} |
| + static SkSumPathEffect* Create(SkPathEffect* first, SkPathEffect* second) { |
| + return SkNEW_ARGS(SkSumPathEffect, (first, second)); |
| + } |
| virtual bool filterPath(SkPath* dst, const SkPath& src, |
| SkStrokeRec*, const SkRect*) const SK_OVERRIDE; |
| @@ -193,6 +196,8 @@ public: |
| SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkSumPathEffect) |
| protected: |
| + SkSumPathEffect(SkPathEffect* first, SkPathEffect* second) |
| + : INHERITED(first, second) {} |
| SkSumPathEffect(SkReadBuffer& buffer) : INHERITED(buffer) {} |
| private: |