OLD | NEW |
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 Loading... |
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);) |
OLD | NEW |