diff options
author | Florin Malita <fmalita@chromium.org> | 2018-03-22 12:20:02 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-22 16:43:05 +0000 |
commit | 69526b023cc9cdced1ae1df74002b11cd6709b12 (patch) | |
tree | ad11cdb6ffc446c48f39a41f88c3db680f4712f9 /experimental/skottie/SkottieProperties.h | |
parent | 1a605cd396620d30a8f2b11bf57439fce5927a00 (diff) |
[sksg] Simplify TrimEffect
Move the Lottie-specific bits to Skottie and keep TrimEffect as a thin
SkTrimPathEffect wrapper.
TBR=
Change-Id: Iecc6624d01ba61eb96a2056ef8e9e24e731f8979
Reviewed-on: https://skia-review.googlesource.com/115923
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Diffstat (limited to 'experimental/skottie/SkottieProperties.h')
-rw-r--r-- | experimental/skottie/SkottieProperties.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/experimental/skottie/SkottieProperties.h b/experimental/skottie/SkottieProperties.h index 8ca026eaeb..5e3fad0d9a 100644 --- a/experimental/skottie/SkottieProperties.h +++ b/experimental/skottie/SkottieProperties.h @@ -28,6 +28,7 @@ class Path; class RadialGradient; class RRect; class RenderNode;; +class TrimEffect; } namespace Json { class Value; } @@ -161,6 +162,22 @@ private: using INHERITED = CompositeGradient; }; +class CompositeTrimEffect final : public SkRefCnt { +public: + explicit CompositeTrimEffect(sk_sp<sksg::TrimEffect>); + + COMPOSITE_PROPERTY(Start , SkScalar, 0) + COMPOSITE_PROPERTY(End , SkScalar, 100) + COMPOSITE_PROPERTY(Offset, SkScalar, 0) + +private: + void apply(); + + sk_sp<sksg::TrimEffect> fTrimEffect; + + using INHERITED = SkRefCnt; +}; + #undef COMPOSITE_PROPERTY } // namespace skottie |