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

Side by Side Diff: bench/HardStopGradientBench.cpp

Issue 2143653002: Add benchmarks for 3 and 4 colors (most common) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "Benchmark.h" 8 #include "Benchmark.h"
9 9
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 90
91 SkShader::TileMode fTileMode; 91 SkShader::TileMode fTileMode;
92 SkString fName; 92 SkString fName;
93 int fColorCount; 93 int fColorCount;
94 SkPaint fPaint; 94 SkPaint fPaint;
95 95
96 typedef Benchmark INHERITED; 96 typedef Benchmark INHERITED;
97 }; 97 };
98 98
99 // Clamp 99 // Clamp
100 DEF_BENCH(return new HardStopGradientBench(SkShader::kClamp_TileMode, 3);)
101 DEF_BENCH(return new HardStopGradientBench(SkShader::kClamp_TileMode, 4);)
100 DEF_BENCH(return new HardStopGradientBench(SkShader::kClamp_TileMode, 5);) 102 DEF_BENCH(return new HardStopGradientBench(SkShader::kClamp_TileMode, 5);)
101 DEF_BENCH(return new HardStopGradientBench(SkShader::kClamp_TileMode, 10);) 103 DEF_BENCH(return new HardStopGradientBench(SkShader::kClamp_TileMode, 10);)
102 DEF_BENCH(return new HardStopGradientBench(SkShader::kClamp_TileMode, 25);) 104 DEF_BENCH(return new HardStopGradientBench(SkShader::kClamp_TileMode, 25);)
103 DEF_BENCH(return new HardStopGradientBench(SkShader::kClamp_TileMode, 50);) 105 DEF_BENCH(return new HardStopGradientBench(SkShader::kClamp_TileMode, 50);)
104 DEF_BENCH(return new HardStopGradientBench(SkShader::kClamp_TileMode, 100);) 106 DEF_BENCH(return new HardStopGradientBench(SkShader::kClamp_TileMode, 100);)
105 107
106 // Repeat 108 // Repeat
109 DEF_BENCH(return new HardStopGradientBench(SkShader::kRepeat_TileMode, 3);)
110 DEF_BENCH(return new HardStopGradientBench(SkShader::kRepeat_TileMode, 4);)
107 DEF_BENCH(return new HardStopGradientBench(SkShader::kRepeat_TileMode, 5);) 111 DEF_BENCH(return new HardStopGradientBench(SkShader::kRepeat_TileMode, 5);)
108 DEF_BENCH(return new HardStopGradientBench(SkShader::kRepeat_TileMode, 10);) 112 DEF_BENCH(return new HardStopGradientBench(SkShader::kRepeat_TileMode, 10);)
109 DEF_BENCH(return new HardStopGradientBench(SkShader::kRepeat_TileMode, 25);) 113 DEF_BENCH(return new HardStopGradientBench(SkShader::kRepeat_TileMode, 25);)
110 DEF_BENCH(return new HardStopGradientBench(SkShader::kRepeat_TileMode, 50);) 114 DEF_BENCH(return new HardStopGradientBench(SkShader::kRepeat_TileMode, 50);)
111 DEF_BENCH(return new HardStopGradientBench(SkShader::kRepeat_TileMode, 100);) 115 DEF_BENCH(return new HardStopGradientBench(SkShader::kRepeat_TileMode, 100);)
112 116
113 // Mirror 117 // Mirror
118 DEF_BENCH(return new HardStopGradientBench(SkShader::kMirror_TileMode, 3);)
119 DEF_BENCH(return new HardStopGradientBench(SkShader::kMirror_TileMode, 4);)
114 DEF_BENCH(return new HardStopGradientBench(SkShader::kMirror_TileMode, 5);) 120 DEF_BENCH(return new HardStopGradientBench(SkShader::kMirror_TileMode, 5);)
115 DEF_BENCH(return new HardStopGradientBench(SkShader::kMirror_TileMode, 10);) 121 DEF_BENCH(return new HardStopGradientBench(SkShader::kMirror_TileMode, 10);)
116 DEF_BENCH(return new HardStopGradientBench(SkShader::kMirror_TileMode, 25);) 122 DEF_BENCH(return new HardStopGradientBench(SkShader::kMirror_TileMode, 25);)
117 DEF_BENCH(return new HardStopGradientBench(SkShader::kMirror_TileMode, 50);) 123 DEF_BENCH(return new HardStopGradientBench(SkShader::kMirror_TileMode, 50);)
118 DEF_BENCH(return new HardStopGradientBench(SkShader::kMirror_TileMode, 100);) 124 DEF_BENCH(return new HardStopGradientBench(SkShader::kMirror_TileMode, 100);)
OLDNEW
« 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