34 for (
int i = 0;
i < loops;
i++) {
54 m = fM0;
m.preScale(fSX, fSY);
55 m = fM1;
m.preScale(fSX, fSY);
56 m = fM2;
m.preScale(fSX, fSY);
67template <
typename T>
void init9(
T array[9]) {
69 for (
int i = 0;
i < 9;
i++) {
80 for (
int i = 0;
i < 10; ++
i) {
92 for (
int i = 0;
i < 10; ++
i) {
147 inv.mapRect(&transformedRect, srcRect);
165 "invert_maprect_rectstaysrect",
170 "invert_maprect_translate",
174 "invert_maprect_nonpersp",
180 "invert_maprect_persp",
184 "invert_maprect_typemask_rectstaysrect",
190 "invert_maprect_typemask_nonpersp",
214 for (
int i = 0;
i <
N; ++
i) {
220 for (
int i = 0;
i < 1000000; ++
i) {
237 enum { MEGA_LOOP = 1000 * 1000 };
245 fR.setLTRB(10, 10, 100, 200);
251 for (
int i = 0;
i < MEGA_LOOP; ++
i) {
255 for (
int i = 0;
i < MEGA_LOOP; ++
i) {
static SkM44 inv(const SkM44 &m)
DEF_BENCH(return new InvertMapRectMatrixBench("invert_maprect_rectstaysrect", InvertMapRectMatrixBench::kScale_Flag|InvertMapRectMatrixBench::kTranslate_Flag);) DEF_BENCH(return new InvertMapRectMatrixBench("invert_maprect_translate"
static SkMatrix make_afine()
static SkMatrix make_scale()
static SkMatrix make_trans()
bool SkDecomposeUpper2x2(const SkMatrix &matrix, SkPoint *rotation1, SkPoint *scale, SkPoint *rotation2)
void performTest() override
void onDelayedSetup() override
void performTest() override
InvertMapRectMatrixBench(const char *name, int flags)
MapPointsMatrixBench(const char name[], const SkMatrix &m)
void performTest() override
void performTest() override
MapRectMatrixBench(const char name[], bool scale_trans)
bool isSuitableFor(Backend backend) override
const char * onGetName() override
virtual void performTest()=0
MatrixBench(const char name[])
void onDraw(int loops, SkCanvas *) override
virtual int mulLoopCount() const
void performTest() override
SkMatrix & postTranslate(SkScalar dx, SkScalar dy)
SkMatrix & postRotate(SkScalar degrees, SkScalar px, SkScalar py)
SkMatrix & postScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py)
static SkMatrix Translate(SkScalar dx, SkScalar dy)
SkMatrix & setPerspX(SkScalar v)
void mapPoints(SkPoint dst[], const SkPoint src[], int count) const
SkMatrix & setTranslate(SkScalar dx, SkScalar dy)
SkMatrix & setScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py)
bool invert(SkMatrix *inverse) const
SkMatrix & setRotate(SkScalar degrees, SkScalar px, SkScalar py)
SkMatrix & setPerspY(SkScalar v)
static const SkMatrix & I()
void mapRectScaleTranslate(SkRect *dst, const SkRect &src) const
SkScalar getPerspX() const
bool mapRect(SkRect *dst, const SkRect &src, SkApplyPerspectiveClip pc=SkApplyPerspectiveClip::kYes) const
float nextRangeF(float min, float max)
FlutterSemanticsFlag flags
DEF_SWITCHES_START aot vmservice shared library name
void set(float x, float y)
static constexpr SkRect MakeWH(float w, float h)