17 , fAnimation(
std::move(animation)) {
18 fUniqueName.
printf(
"%s_%s",
name, fAnimation->getTag());
22 return fUniqueName.
c_str();
35 fAnimation->preConcatFrameMatrix(fAnimationTime.
nextRangeF(0, 1000), fDevBounds, &trans);
36 this->
surfaces()[j]->getCanvas()->drawPicture(this->
picture(), &trans,
nullptr);
48 , fZoomPeriodMs(zoomPeriodMs) {
51 const char*
getTag()
override {
return "zoom"; }
55 double t = fmod(animationTimeMs / fZoomPeriodMs, 1.0);
72 double zoomPeriodMs) {
73 return sk_make_sp<ZoomAnimation>(zoomMax, zoomPeriodMs);
SkAssertResult(font.textToGlyphs("Hello", 5, SkTextEncoding::kUTF8, glyphs, std::size(glyphs))==count)
static SkPath clip(const SkPath &path, const SkHalfPlane &plane)
static SkScalar center(float pos0, float pos1)
SKPAnimationBench(const char *name, const SkPicture *, const SkIRect &devClip, sk_sp< Animation >, bool doLooping)
const char * onGetUniqueName() override
void drawPicture() override
void onPerCanvasPreDraw(SkCanvas *canvas) override
static sk_sp< Animation > MakeZoomAnimation(SkScalar zoomMax, double zoomPeriodMs)
const skia_private::TArray< sk_sp< SkSurface > > & surfaces() const
void onPerCanvasPreDraw(SkCanvas *) override
const SkPicture * picture() const
const SkTDArray< SkIRect > & tileRects() const
SkIRect getDeviceClipBounds() const
static SkMatrix Translate(SkScalar dx, SkScalar dy)
SkMatrix & preTranslate(SkScalar dx, SkScalar dy)
SkMatrix & preScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py)
float nextRangeF(float min, float max)
void printf(const char format[],...) SK_PRINTF_LIKE(2
const char * c_str() const
const char * getTag() override
ZoomAnimation(SkScalar zoomMax, double zoomPeriodMs)
void preConcatFrameMatrix(double animationTimeMs, const SkIRect &devBounds, SkMatrix *drawMatrix) override
DEF_SWITCHES_START aot vmservice shared library name
const myers::Point & get(const myers::Segment &)
void Flush(SkSurface *surface)
int32_t fBottom
larger y-axis bounds
int32_t fTop
smaller y-axis bounds
int32_t fLeft
smaller x-axis bounds
int32_t fRight
larger x-axis bounds
static constexpr SkPoint Make(float x, float y)