OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkPaint.h" | 10 #include "SkPaint.h" |
| 11 #include "SkPath.h" |
11 #include "SkRandom.h" | 12 #include "SkRandom.h" |
| 13 #include "SkTDArray.h" |
12 | 14 |
13 /** | 15 /** |
14 * This is a conversion of samplecode/SampleChart.cpp into a bench. It sure woul
d be nice to be able | 16 * This is a conversion of samplecode/SampleChart.cpp into a bench. It sure woul
d be nice to be able |
15 * to write one subclass that can be a GM, bench, and/or Sample. | 17 * to write one subclass that can be a GM, bench, and/or Sample. |
16 */ | 18 */ |
17 | 19 |
18 // Generates y values for the chart plots. | 20 // Generates y values for the chart plots. |
19 static void gen_data(SkScalar yAvg, SkScalar ySpread, int count, | 21 static void gen_data(SkScalar yAvg, SkScalar ySpread, int count, |
20 SkRandom* random, SkTDArray<SkScalar>* dataPts) { | 22 SkRandom* random, SkTDArray<SkScalar>* dataPts) { |
21 dataPts->setCount(count); | 23 dataPts->setCount(count); |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 SkTDArray<SkScalar> fData[kNumGraphs]; | 185 SkTDArray<SkScalar> fData[kNumGraphs]; |
184 bool fAA; | 186 bool fAA; |
185 | 187 |
186 typedef Benchmark INHERITED; | 188 typedef Benchmark INHERITED; |
187 }; | 189 }; |
188 | 190 |
189 ////////////////////////////////////////////////////////////////////////////// | 191 ////////////////////////////////////////////////////////////////////////////// |
190 | 192 |
191 DEF_BENCH( return new ChartBench(true); ) | 193 DEF_BENCH( return new ChartBench(true); ) |
192 DEF_BENCH( return new ChartBench(false); ) | 194 DEF_BENCH( return new ChartBench(false); ) |
OLD | NEW |