Remove aarects benchmark. Redundant with rotated_rects* bench and *much* slower.
NOTREECHECKS=true R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/469373003
This commit is contained in:
parent
a7f79b47fa
commit
87c35adbda
@ -170,60 +170,6 @@ protected:
|
||||
virtual const char* onGetName() { return fName; }
|
||||
};
|
||||
|
||||
class AARectBench : public Benchmark {
|
||||
public:
|
||||
enum {
|
||||
W = 640,
|
||||
H = 480,
|
||||
};
|
||||
|
||||
AARectBench(bool rotate) : fRotate(rotate) {}
|
||||
|
||||
protected:
|
||||
|
||||
virtual const char* onGetName() {
|
||||
if (fRotate) {
|
||||
return "aarects_rotated";
|
||||
}
|
||||
return "aarects";
|
||||
}
|
||||
|
||||
virtual void onDraw(const int loops, SkCanvas* canvas) {
|
||||
static const SkScalar kHalfRectSize = 0.75f;
|
||||
|
||||
SkPaint paint;
|
||||
this->setupPaint(&paint);
|
||||
paint.setAntiAlias(true);
|
||||
paint.setColor(SK_ColorBLACK);
|
||||
SkRect r = { -kHalfRectSize, -kHalfRectSize, kHalfRectSize, kHalfRectSize };
|
||||
int rot = 0;
|
||||
|
||||
for (int i = 0; i < loops; i++) {
|
||||
// Draw small aa rects in a grid across the screen
|
||||
for (SkScalar y = kHalfRectSize+SK_Scalar1; y < H; y += 2*kHalfRectSize+2) {
|
||||
for (SkScalar x = kHalfRectSize+SK_Scalar1; x < W; x += 2*kHalfRectSize+2) {
|
||||
canvas->save();
|
||||
canvas->translate(x, y);
|
||||
|
||||
if (fRotate) {
|
||||
SkMatrix rotate;
|
||||
rotate.setRotate(SkIntToScalar(rot));
|
||||
canvas->concat(rotate);
|
||||
rot += 10;
|
||||
}
|
||||
|
||||
canvas->drawRect(r, paint);
|
||||
canvas->restore();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
private:
|
||||
bool fRotate;
|
||||
typedef Benchmark INHERITED;
|
||||
};
|
||||
|
||||
/*******************************************************************************
|
||||
* to bench BlitMask [Opaque, Black, color, shader]
|
||||
*******************************************************************************/
|
||||
@ -322,9 +268,6 @@ DEF_BENCH( return SkNEW_ARGS(PointsBench, (SkCanvas::kPolygon_PointMode, "polygo
|
||||
|
||||
DEF_BENCH( return SkNEW_ARGS(SrcModeRectBench, ()); )
|
||||
|
||||
DEF_BENCH( return SkNEW_ARGS(AARectBench, (false)); )
|
||||
DEF_BENCH( return SkNEW_ARGS(AARectBench, (true)); )
|
||||
|
||||
/* init the blitmask bench
|
||||
*/
|
||||
DEF_BENCH( return SkNEW_ARGS(BlitMaskBench,
|
||||
|
Loading…
Reference in New Issue
Block a user