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

Unified Diff: bench/BigPathBench.cpp

Issue 909893002: add rounded-join option to bigpath bench (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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/BigPathBench.cpp
diff --git a/bench/BigPathBench.cpp b/bench/BigPathBench.cpp
index a8d7f8fe28dd7896d97ed940e792e73be82699ae..c46296e1591b241fa5bd527a88a15da45bb042a2 100644
--- a/bench/BigPathBench.cpp
+++ b/bench/BigPathBench.cpp
@@ -27,10 +27,14 @@ class BigPathBench : public Benchmark {
SkPath fPath;
SkString fName;
Align fAlign;
+ bool fRound;
public:
- BigPathBench(Align align) : fAlign(align) {
+ BigPathBench(Align align, bool round) : fAlign(align), fRound(round) {
fName.printf("bigpath_%s", gAlignName[fAlign]);
+ if (round) {
+ fName.append("_round");
+ }
}
protected:
@@ -51,6 +55,9 @@ protected:
paint.setAntiAlias(true);
paint.setStyle(SkPaint::kStroke_Style);
paint.setStrokeWidth(2);
+ if (fRound) {
+ paint.setStrokeJoin(SkPaint::kRound_Join);
+ }
this->setupPaint(&paint);
const SkRect r = fPath.getBounds();
@@ -74,7 +81,11 @@ private:
typedef Benchmark INHERITED;
};
-DEF_BENCH( return new BigPathBench(kLeft_Align); )
-DEF_BENCH( return new BigPathBench(kMiddle_Align); )
-DEF_BENCH( return new BigPathBench(kRight_Align); )
+DEF_BENCH( return new BigPathBench(kLeft_Align, false); )
+DEF_BENCH( return new BigPathBench(kMiddle_Align, false); )
+DEF_BENCH( return new BigPathBench(kRight_Align, false); )
+
+DEF_BENCH( return new BigPathBench(kLeft_Align, true); )
+DEF_BENCH( return new BigPathBench(kMiddle_Align, true); )
+DEF_BENCH( return new BigPathBench(kRight_Align, true); )
« 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