Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1214)

Unified Diff: bench/RectBench.cpp

Issue 469373003: Remove aarects benchmark. Redundant with rotated_rects* bench and *much* slower. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/RectBench.cpp
diff --git a/bench/RectBench.cpp b/bench/RectBench.cpp
index f50324a580b3de2e595de77189f4fd337882ddf4..c0201dca4bebe64de6e33d412615100459883d65 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,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698