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

Unified Diff: bench/MatrixBench.cpp

Issue 1040783002: use table of procs (and unrolling) to speed up mapPts (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 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 | include/core/SkMatrix.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/MatrixBench.cpp
diff --git a/bench/MatrixBench.cpp b/bench/MatrixBench.cpp
index 6bd1e2a8a6c901703c64fb9e067130734caacb48..68195e70e4d95ab0eb665ef82128b8f12aa2b812 100644
--- a/bench/MatrixBench.cpp
+++ b/bench/MatrixBench.cpp
@@ -267,8 +267,7 @@ DEF_BENCH( return new InvertMapRectMatrixBench(
///////////////////////////////////////////////////////////////////////////////
-static SkMatrix make_ident() { SkMatrix m; m.reset(); return m; }
-static SkMatrix make_trans() { SkMatrix m; m.setTranslate(2, 3); return m; }
+static SkMatrix make_trans() { return SkMatrix::MakeTrans(2, 3); }
static SkMatrix make_scale() { SkMatrix m(make_trans()); m.postScale(1.5f, 0.5f); return m; }
static SkMatrix make_afine() { SkMatrix m(make_trans()); m.postRotate(15); return m; }
@@ -302,8 +301,6 @@ public:
}
}
};
-DEF_BENCH( return new MapPointsMatrixBench("mappts_ident0", make_ident(), false); )
-DEF_BENCH( return new MapPointsMatrixBench("mappts_ident1", make_ident(), true); )
DEF_BENCH( return new MapPointsMatrixBench("mappts_trans0", make_trans(), false); )
DEF_BENCH( return new MapPointsMatrixBench("mappts_trans1", make_trans(), true); )
DEF_BENCH( return new MapPointsMatrixBench("mappts_scale0", make_scale(), false); )
« no previous file with comments | « no previous file | include/core/SkMatrix.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698