47 fNodes[
i].init(&fRand);
53 paint.setAntiAlias(
true);
63 fNodes[
i].
pos().fY - fNodes[
i].
size()-0.5f,
64 fNodes[
i].
pos().fX + fNodes[
i].
size()+0.5f,
65 fNodes[
i].
pos().fY + fNodes[
i].
size()+0.5f);
73 if (0.0f != fLastTime) {
75 fNodes[
i].update(nanos, fLastTime);
79 fLastTime = 1
e-9 * nanos;
110 SkScalar deltaTime = 1
e-9 * nanos - lastTime;
112 fPos.fX += deltaTime * fSpeed * fDir.fX;
113 fPos.fY += deltaTime * fSpeed * fDir.fY;
114 if (fPos.fX >=
kWidth || fPos.fX < 0.0f) {
115 fPos.fX = SkTPin<SkScalar>(fPos.fX, 0.0f,
kWidth);
118 if (fPos.fY >=
kHeight || fPos.fY < 0.0f) {
119 fPos.fY = SkTPin<SkScalar>(fPos.fY, 0.0f,
kHeight);
126 SkScalar sigma()
const {
return fBlur; }
143 using INHERITED =
GM;
148static constexpr float kMaxBlurSigma = 250.f;
149static constexpr float kAnimationDuration = 12.f;
167 auto drawBlurredImage = [&](
float tx,
float ty,
SkTileMode tileMode) {
186 0.f, 0.0f, kMaxBlurSigma);
static const SkScalar kBlurMax
static const SkScalar kBlurAnimationDuration
static const int kNumNodes
SkISize getISize() override
SkString getName() const override
void onDraw(SkCanvas *canvas) override
bool runAsBench() const override
bool onAnimate(double nanos) override
void onOnceBeforeDraw() override
bool onAnimate(double nanos) override
bool runAsBench() const override
void onDraw(SkCanvas *canvas) override
SkISize getISize() override
SkString getName() const override
void onOnceBeforeDraw() override
int saveLayer(const SkRect *bounds, const SkPaint *paint)
void translate(SkScalar dx, SkScalar dy)
void drawRRect(const SkRRect &rrect, const SkPaint &paint)
void drawImageRect(const SkImage *, const SkRect &src, const SkRect &dst, const SkSamplingOptions &, const SkPaint *, SrcRectConstraint)
static sk_sp< SkImageFilter > Blur(SkScalar sigmaX, SkScalar sigmaY, SkTileMode tileMode, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
void setImageFilter(sk_sp< SkImageFilter > imageFilter)
static SkRRect MakeRectXY(const SkRect &rect, SkScalar xRad, SkScalar yRad)
float nextRangeF(float min, float max)
GM(SkColor backgroundColor=SK_ColorWHITE)
sk_sp< SkBlender > blender SkRect rect
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 SkRect MakeIWH(int w, int h)
static constexpr SkRect MakeLTRB(float l, float t, float r, float b)