aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/RectBench.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2014-08-14 13:03:58 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-08-14 13:03:58 -0700
commit87c35adbdab5afc451046540150e05e41e4ec1f7 (patch)
tree5e2a18866d5642a281060b17f521fea9a2929e81 /bench/RectBench.cpp
parenta7f79b47fa8924691f69da5d71d3c402c7f9bf6f (diff)
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
Diffstat (limited to 'bench/RectBench.cpp')
-rw-r--r--bench/RectBench.cpp57
1 files changed, 0 insertions, 57 deletions
diff --git a/bench/RectBench.cpp b/bench/RectBench.cpp
index f50324a580..c0201dca4b 100644
--- a/bench/RectBench.cpp
+++ b/bench/RectBench.cpp
@@ -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,