| 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, false }; | 467 kPremul_SkAlphaType, 0, kBogusGLContextType, kNone_GLC
ontextOptions, |
| 468 false }; |
| 468 configs->push(config); | 469 configs->push(config); |
| 469 } | 470 } |
| 470 #endif | 471 #endif |
| 471 } | 472 } |
| 472 | 473 |
| 473 // If bench is enabled for config, returns a Target* for it, otherwise nullptr. | 474 // If bench is enabled for config, returns a Target* for it, otherwise nullptr. |
| 474 static Target* is_enabled(Benchmark* bench, const Config& config) { | 475 static Target* is_enabled(Benchmark* bench, const Config& config) { |
| 475 if (!bench->isSuitableFor(config.backend)) { | 476 if (!bench->isSuitableFor(config.backend)) { |
| 476 return nullptr; | 477 return nullptr; |
| 477 } | 478 } |
| (...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1281 | 1282 |
| 1282 return 0; | 1283 return 0; |
| 1283 } | 1284 } |
| 1284 | 1285 |
| 1285 #if !defined SK_BUILD_FOR_IOS | 1286 #if !defined SK_BUILD_FOR_IOS |
| 1286 int main(int argc, char** argv) { | 1287 int main(int argc, char** argv) { |
| 1287 SkCommandLineFlags::Parse(argc, argv); | 1288 SkCommandLineFlags::Parse(argc, argv); |
| 1288 return nanobench_main(); | 1289 return nanobench_main(); |
| 1289 } | 1290 } |
| 1290 #endif | 1291 #endif |
| OLD | NEW |