Add "enabled" flag to affectors, fix curve interaction with stable random
Flag is helpful while editing things (and could be a useful property to
animate, as well). The curve change fixes a bug where the stable generator
gets out of phase if all segments of a curve don't use the same options.
Bug: skia:
Change-Id: Ie151e775aee22957e79fa88feaafad72b6c781ff
Reviewed-on: https://skia-review.googlesource.com/c/195120
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
diff --git a/modules/particles/include/SkCurve.h b/modules/particles/include/SkCurve.h
index b3c0ca6..ec61228 100644
--- a/modules/particles/include/SkCurve.h
+++ b/modules/particles/include/SkCurve.h
@@ -45,7 +45,7 @@
*/
struct SkCurveSegment {
- SkScalar eval(SkScalar x, SkRandom& random) const;
+ SkScalar eval(SkScalar x, SkScalar t, bool negate) const;
void visitFields(SkFieldVisitor* v);
void setConstant(SkScalar c) {