OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "BenchTimer.h" | 8 #include "BenchTimer.h" |
9 #include "ResultsWriter.h" | 9 #include "ResultsWriter.h" |
10 #include "SkBenchLogger.h" | 10 #include "SkBenchLogger.h" |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 #endif | 200 #endif |
201 | 201 |
202 static const struct Config { | 202 static const struct Config { |
203 SkColorType fColorType; | 203 SkColorType fColorType; |
204 const char* name; | 204 const char* name; |
205 int sampleCount; | 205 int sampleCount; |
206 SkBenchmark::Backend backend; | 206 SkBenchmark::Backend backend; |
207 GLContextType contextType; | 207 GLContextType contextType; |
208 bool runByDefault; | 208 bool runByDefault; |
209 } gConfigs[] = { | 209 } gConfigs[] = { |
210 { kPMColor_SkColorType, "NONRENDERING", 0, SkBenchmark::kNonRendering_Backen
d, kNative, true}, | 210 { kN32_SkColorType, "NONRENDERING", 0, SkBenchmark::kNonRendering_Backen
d, kNative, true}, |
211 { kPMColor_SkColorType, "8888", 0, SkBenchmark::kRaster_Backend,
kNative, true}, | 211 { kN32_SkColorType, "8888", 0, SkBenchmark::kRaster_Backend,
kNative, true}, |
212 { kRGB_565_SkColorType, "565", 0, SkBenchmark::kRaster_Backend,
kNative, true}, | 212 { kRGB_565_SkColorType, "565", 0, SkBenchmark::kRaster_Backend,
kNative, true}, |
213 #if SK_SUPPORT_GPU | 213 #if SK_SUPPORT_GPU |
214 { kPMColor_SkColorType, "GPU", 0, SkBenchmark::kGPU_Backend,
kNative, true}, | 214 { kN32_SkColorType, "GPU", 0, SkBenchmark::kGPU_Backend,
kNative, true}, |
215 { kPMColor_SkColorType, "MSAA4", 4, SkBenchmark::kGPU_Backend,
kNative, false}, | 215 { kN32_SkColorType, "MSAA4", 4, SkBenchmark::kGPU_Backend,
kNative, false}, |
216 { kPMColor_SkColorType, "MSAA16", 16, SkBenchmark::kGPU_Backend,
kNative, false}, | 216 { kN32_SkColorType, "MSAA16", 16, SkBenchmark::kGPU_Backend,
kNative, false}, |
217 { kPMColor_SkColorType, "NVPRMSAA4", 4, SkBenchmark::kGPU_Backend,
kNVPR, true}, | 217 { kN32_SkColorType, "NVPRMSAA4", 4, SkBenchmark::kGPU_Backend,
kNVPR, true}, |
218 { kPMColor_SkColorType, "NVPRMSAA16", 16, SkBenchmark::kGPU_Backend,
kNVPR, false}, | 218 { kN32_SkColorType, "NVPRMSAA16", 16, SkBenchmark::kGPU_Backend,
kNVPR, false}, |
219 #if SK_ANGLE | 219 #if SK_ANGLE |
220 { kPMColor_SkColorType, "ANGLE", 0, SkBenchmark::kGPU_Backend,
kANGLE, true}, | 220 { kN32_SkColorType, "ANGLE", 0, SkBenchmark::kGPU_Backend,
kANGLE, true}, |
221 #endif // SK_ANGLE | 221 #endif // SK_ANGLE |
222 { kPMColor_SkColorType, "Debug", 0, SkBenchmark::kGPU_Backend,
kDebug, kIsDebug}, | 222 { kN32_SkColorType, "Debug", 0, SkBenchmark::kGPU_Backend,
kDebug, kIsDebug}, |
223 { kPMColor_SkColorType, "NULLGPU", 0, SkBenchmark::kGPU_Backend,
kNull, true}, | 223 { kN32_SkColorType, "NULLGPU", 0, SkBenchmark::kGPU_Backend,
kNull, true}, |
224 #endif // SK_SUPPORT_GPU | 224 #endif // SK_SUPPORT_GPU |
225 }; | 225 }; |
226 | 226 |
227 DEFINE_string(outDir, "", "If given, image of each bench will be put in outDir."
); | 227 DEFINE_string(outDir, "", "If given, image of each bench will be put in outDir."
); |
228 DEFINE_string(timers, "cg", "Timers to display. " | 228 DEFINE_string(timers, "cg", "Timers to display. " |
229 "Options: w(all) W(all, truncated) c(pu) C(pu, truncated) g(pu)"); | 229 "Options: w(all) W(all, truncated) c(pu) C(pu, truncated) g(pu)"); |
230 | 230 |
231 DEFINE_bool(rotate, false, "Rotate canvas before bench run?"); | 231 DEFINE_bool(rotate, false, "Rotate canvas before bench run?"); |
232 DEFINE_bool(scale, false, "Scale canvas before bench run?"); | 232 DEFINE_bool(scale, false, "Scale canvas before bench run?"); |
233 DEFINE_bool(clip, false, "Clip canvas before bench run?"); | 233 DEFINE_bool(clip, false, "Clip canvas before bench run?"); |
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
684 gContextFactory.destroyContexts(); | 684 gContextFactory.destroyContexts(); |
685 #endif | 685 #endif |
686 return 0; | 686 return 0; |
687 } | 687 } |
688 | 688 |
689 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) | 689 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) |
690 int main(int argc, char * const argv[]) { | 690 int main(int argc, char * const argv[]) { |
691 return tool_main(argc, (char**) argv); | 691 return tool_main(argc, (char**) argv); |
692 } | 692 } |
693 #endif | 693 #endif |
OLD | NEW |