| 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 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 | 429 |
| 430 if (FLAGS_cpu) { | 430 if (FLAGS_cpu) { |
| 431 CPU_CONFIG(nonrendering, kNonRendering_Backend, kUnknown_SkColorType, kU
npremul_SkAlphaType) | 431 CPU_CONFIG(nonrendering, kNonRendering_Backend, kUnknown_SkColorType, kU
npremul_SkAlphaType) |
| 432 CPU_CONFIG(8888, kRaster_Backend, kN32_SkColorType, kPremul_SkAlphaType) | 432 CPU_CONFIG(8888, kRaster_Backend, kN32_SkColorType, kPremul_SkAlphaType) |
| 433 CPU_CONFIG(565, kRaster_Backend, kRGB_565_SkColorType, kOpaque_SkAlphaTy
pe) | 433 CPU_CONFIG(565, kRaster_Backend, kRGB_565_SkColorType, kOpaque_SkAlphaTy
pe) |
| 434 } | 434 } |
| 435 | 435 |
| 436 #undef CPU_CONFIG | 436 #undef CPU_CONFIG |
| 437 | 437 |
| 438 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK | 438 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK |
| 439 if (is_cpu_config_allowed("hwui", config)) { | 439 if (config->getTag().equals("hwui")) { |
| 440 Config config = { "hwui", Benchmark::kHWUI_Backend, kRGBA_8888_SkColorTy
pe, | 440 Config config = { SkString("hwui"), Benchmark::kHWUI_Backend, kRGBA_8888
_SkColorType, |
| 441 kPremul_SkAlphaType, 0, kBogusGLContextType, kBogusGLC
ontextOptions, | 441 kPremul_SkAlphaType, 0, kBogusGLContextType, kBogusGLC
ontextOptions, |
| 442 false }; | 442 false }; |
| 443 configs->push_back(config); | 443 configs->push_back(config); |
| 444 return; | |
| 445 } | 444 } |
| 446 #endif | 445 #endif |
| 447 } | 446 } |
| 448 | 447 |
| 449 // Append all configs that are enabled and supported. | 448 // Append all configs that are enabled and supported. |
| 450 void create_configs(SkTArray<Config>* configs) { | 449 void create_configs(SkTArray<Config>* configs) { |
| 451 SkCommandLineConfigArray array; | 450 SkCommandLineConfigArray array; |
| 452 ParseConfigs(FLAGS_config, &array); | 451 ParseConfigs(FLAGS_config, &array); |
| 453 for (int i = 0; i < array.count(); ++i) { | 452 for (int i = 0; i < array.count(); ++i) { |
| 454 create_config(array[i], configs); | 453 create_config(array[i], configs); |
| (...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1206 | 1205 |
| 1207 return 0; | 1206 return 0; |
| 1208 } | 1207 } |
| 1209 | 1208 |
| 1210 #if !defined SK_BUILD_FOR_IOS | 1209 #if !defined SK_BUILD_FOR_IOS |
| 1211 int main(int argc, char** argv) { | 1210 int main(int argc, char** argv) { |
| 1212 SkCommandLineFlags::Parse(argc, argv); | 1211 SkCommandLineFlags::Parse(argc, argv); |
| 1213 return nanobench_main(); | 1212 return nanobench_main(); |
| 1214 } | 1213 } |
| 1215 #endif | 1214 #endif |
| OLD | NEW |