58 paint.setAntiAlias(
true);
66 constexpr SkScalar kDesiredDurationSecs = 3.0f;
70 if (fraction <= 0.0f) {
74 SkASSERT(fraction >= 0.0f && fraction <= 1.0f);
91#include
"modules/skottie/include/Skottie.h"
93class SkottieGM : public
skiagm::GM {
110 ~SkottieGM()
override {
111 for (
auto anim : fAnims) {
126 for (
int i = 0; i <
N; ++i) {
130 fRects[i].setXYWH(
x,
y, 400, 400);
135 void onDraw(
SkCanvas* canvas)
override {
140 for (
int i = 0; i <
N; ++i) {
141 fAnims[0]->
render(canvas, &fRects[i]);
145 bool onAnimate(
double nanos)
override {
147 for (
auto anim : fAnims) {
156DEF_GM(
return new SkottieGM; )
static int step(int x, SkScalar min, SkScalar max)
static void sk_bzero(void *buffer, size_t size)
#define INHERITED(method,...)
static void SkSafeUnref(T *obj)
#define SkScalarSin(radians)
#define SkScalarCos(radians)
static SkScalar center(float pos0, float pos1)
Type::kYUV Type::kRGBA() int(0.7 *637)
void drawColor(SkColor color, SkBlendMode mode=SkBlendMode::kSrcOver)
void drawPath(const SkPath &path, const SkPaint &paint)
static sk_sp< SkData > MakeFromFileName(const char path[])
@ kStroke_Style
set to stroke geometry
bool onAnimate(double nanos) override
SkISize getISize() override
SkString getName() const override
void onDraw(SkCanvas *canvas) override
GM(SkColor backgroundColor=SK_ColorWHITE)
static sk_sp< Animation > Make(const char *data, size_t length)
void render(SkCanvas *canvas, const SkRect *dst=nullptr) const
static float Scaled(float time, float speed, float period=0)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot data
constexpr SkScalar kAngle
constexpr int kMaxNumSteps
static constexpr SkISize Make(int32_t w, int32_t h)
static constexpr SkPoint Make(float x, float y)