38 0, kRadiusPingPoingPeriod, kRadiusPingPoingShift, kMinRadius, kMaxRadius);
40 kBlurRadiusPingPoingPeriod,
41 kBlurRadiusPingPoingShift,
54 constexpr SkScalar kMaxR = kMaxRadius + kMaxBlurRadius;
56 auto almostCircleMaker = [] (
SkScalar radius) {
74 SkPath almostCircle = almostCircleMaker(fAnimRadius);
86 constexpr SkScalar kBlurRadiusSteps = 5;
88 kPad + kMinRadius + kMaxBlurRadius);
89 constexpr SkScalar kDeltaRadius = (kMaxRadius - kMinRadius) / kRadiusSteps;
90 constexpr SkScalar kDeltaBlurRadius = (kMaxBlurRadius - kMinBlurRadius) /
94 for (
int r = 0; r < kRadiusSteps - 1; ++r) {
95 const SkScalar radius = r * kDeltaRadius + kMinRadius;
96 lineWidth += 2 * (radius + kMaxBlurRadius) +
kPad;
99 for (
int br = 0; br < kBlurRadiusSteps; ++br) {
100 SkScalar blurRadius = br * kDeltaBlurRadius + kMinBlurRadius;
102 blurRadius += fRandom.
nextSScalar1() * kDeltaBlurRadius;
104 const SkScalar maxRowR = blurRadius + kMaxRadius;
105 paint.setMaskFilter(blurMaker(blurRadius));
107 for (
int r = 0; r < kRadiusSteps; ++r) {
108 SkScalar radius = r * kDeltaRadius + kMinRadius;
114 almostCircle = almostCircleMaker(radius);
123 const SkScalar maxColR = radius + kMaxBlurRadius;
131 if (br != kBlurRadiusSteps - 1) {
132 canvas->
drawLine(0, lineY, lineWidth, lineY, blackPaint);
142 fAnimRadius =
TimeUtils::PingPong(1
e-9 * nanos, kRadiusPingPoingPeriod, kRadiusPingPoingShift, kMinRadius,
144 fAnimBlurRadius =
TimeUtils::PingPong(1
e-9 * nanos, kBlurRadiusPingPoingPeriod, kBlurRadiusPingPoingShift,
145 kMinBlurRadius, kMaxBlurRadius);
150 inline static constexpr SkScalar kMinRadius = 15;
151 inline static constexpr SkScalar kMaxRadius = 45;
152 inline static constexpr SkScalar kRadiusPingPoingPeriod = 8;
153 inline static constexpr SkScalar kRadiusPingPoingShift = 3;
155 inline static constexpr SkScalar kMinBlurRadius = 5;
156 inline static constexpr SkScalar kMaxBlurRadius = 45;
157 inline static constexpr SkScalar kBlurRadiusPingPoingPeriod = 3;
158 inline static constexpr SkScalar kBlurRadiusPingPoingShift = 1.5;
@ kNormal_SkBlurStyle
fuzzy inside and outside
constexpr SkColor SK_ColorBLACK
bool runAsBench() const override
SkISize getISize() override
bool onAnimate(double nanos) override
SkString getName() const override
void onDraw(SkCanvas *canvas) override
static SkScalar SK_SPI ConvertRadiusToSigma(SkScalar radius)
void translate(SkScalar dx, SkScalar dy)
void drawLine(SkScalar x0, SkScalar y0, SkScalar x1, SkScalar y1, const SkPaint &paint)
virtual SkISize getBaseLayerSize() const
void drawPath(const SkPath &path, const SkPaint &paint)
void drawCircle(SkScalar cx, SkScalar cy, SkScalar radius, const SkPaint &paint)
static sk_sp< SkMaskFilter > MakeBlur(SkBlurStyle style, SkScalar sigma, bool respectCTM=true)
void setColor(SkColor color)
void setMaskFilter(sk_sp< SkMaskFilter > maskFilter)
SkPathBuilder & addArc(const SkRect &oval, SkScalar startAngleDeg, SkScalar sweepAngleDeg)
SkPathBuilder & setIsVolatile(bool isVolatile)
static float PingPong(double time, float period, float phase, float ends, float mid)
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
static constexpr SkISize Make(int32_t w, int32_t h)
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)