Remove aarects benchmark. Redundant with rotated_rects* bench and *much* slower.
authorbsalomon <bsalomon@google.com>
Thu, 14 Aug 2014 20:03:58 +0000 (13:03 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 14 Aug 2014 20:03:58 +0000 (13:03 -0700)
NOTREECHECKS=true
R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/469373003

bench/RectBench.cpp

index f50324a580b3de2e595de77189f4fd337882ddf4..c0201dca4bebe64de6e33d412615100459883d65 100644 (file)
@@ -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,