OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 <ctype.h> | 8 #include <ctype.h> |
9 | 9 |
10 #include "nanobench.h" | 10 #include "nanobench.h" |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 #endif | 457 #endif |
458 #if SK_MESA | 458 #if SK_MESA |
459 GPU_CONFIG(mesa, kMESA_GLContextType, kNone_GLContextOptions, 0, false) | 459 GPU_CONFIG(mesa, kMESA_GLContextType, kNone_GLContextOptions, 0, false) |
460 #endif | 460 #endif |
461 } | 461 } |
462 #endif | 462 #endif |
463 | 463 |
464 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK | 464 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK |
465 if (is_cpu_config_allowed("hwui")) { | 465 if (is_cpu_config_allowed("hwui")) { |
466 Config config = { "hwui", Benchmark::kHWUI_Backend, kRGBA_8888_SkColorTy
pe, | 466 Config config = { "hwui", Benchmark::kHWUI_Backend, kRGBA_8888_SkColorTy
pe, |
467 kPremul_SkAlphaType, 0, kBogusGLContextType, kNone_GLC
ontextOptions, | 467 kPremul_SkAlphaType, 0, kBogusGLContextType, false }; |
468 false }; | |
469 configs->push(config); | 468 configs->push(config); |
470 } | 469 } |
471 #endif | 470 #endif |
472 } | 471 } |
473 | 472 |
474 // If bench is enabled for config, returns a Target* for it, otherwise nullptr. | 473 // If bench is enabled for config, returns a Target* for it, otherwise nullptr. |
475 static Target* is_enabled(Benchmark* bench, const Config& config) { | 474 static Target* is_enabled(Benchmark* bench, const Config& config) { |
476 if (!bench->isSuitableFor(config.backend)) { | 475 if (!bench->isSuitableFor(config.backend)) { |
477 return nullptr; | 476 return nullptr; |
478 } | 477 } |
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1282 | 1281 |
1283 return 0; | 1282 return 0; |
1284 } | 1283 } |
1285 | 1284 |
1286 #if !defined SK_BUILD_FOR_IOS | 1285 #if !defined SK_BUILD_FOR_IOS |
1287 int main(int argc, char** argv) { | 1286 int main(int argc, char** argv) { |
1288 SkCommandLineFlags::Parse(argc, argv); | 1287 SkCommandLineFlags::Parse(argc, argv); |
1289 return nanobench_main(); | 1288 return nanobench_main(); |
1290 } | 1289 } |
1291 #endif | 1290 #endif |
OLD | NEW |