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 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 CPU_CONFIG(nonrendering, kNonRendering_Backend, | 452 CPU_CONFIG(nonrendering, kNonRendering_Backend, |
453 kUnknown_SkColorType, kUnpremul_SkAlphaType, nullptr) | 453 kUnknown_SkColorType, kUnpremul_SkAlphaType, nullptr) |
454 | 454 |
455 CPU_CONFIG(8888, kRaster_Backend, | 455 CPU_CONFIG(8888, kRaster_Backend, |
456 kN32_SkColorType, kPremul_SkAlphaType, nullptr) | 456 kN32_SkColorType, kPremul_SkAlphaType, nullptr) |
457 CPU_CONFIG(565, kRaster_Backend, | 457 CPU_CONFIG(565, kRaster_Backend, |
458 kRGB_565_SkColorType, kOpaque_SkAlphaType, nullptr) | 458 kRGB_565_SkColorType, kOpaque_SkAlphaType, nullptr) |
459 auto srgbColorSpace = SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named); | 459 auto srgbColorSpace = SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named); |
460 CPU_CONFIG(srgb, kRaster_Backend, | 460 CPU_CONFIG(srgb, kRaster_Backend, |
461 kN32_SkColorType, kPremul_SkAlphaType, srgbColorSpace) | 461 kN32_SkColorType, kPremul_SkAlphaType, srgbColorSpace) |
| 462 auto srgbLinearColorSpace = SkColorSpace::NewNamed(SkColorSpace::kSRGBLi
near_Named); |
462 CPU_CONFIG(f16, kRaster_Backend, | 463 CPU_CONFIG(f16, kRaster_Backend, |
463 kRGBA_F16_SkColorType, kPremul_SkAlphaType, srgbColorSpace->m
akeLinearGamma()) | 464 kRGBA_F16_SkColorType, kPremul_SkAlphaType, srgbLinearColorSp
ace) |
464 } | 465 } |
465 | 466 |
466 #undef CPU_CONFIG | 467 #undef CPU_CONFIG |
467 | 468 |
468 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK | 469 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK |
469 if (config->getTag().equals("hwui")) { | 470 if (config->getTag().equals("hwui")) { |
470 Config config = { SkString("hwui"), Benchmark::kHWUI_Backend, | 471 Config config = { SkString("hwui"), Benchmark::kHWUI_Backend, |
471 kRGBA_8888_SkColorType, kPremul_SkAlphaType, nullptr, | 472 kRGBA_8888_SkColorType, kPremul_SkAlphaType, nullptr, |
472 0, kBogusContextType, kBogusContextOptions, false }; | 473 0, kBogusContextType, kBogusContextOptions, false }; |
473 configs->push_back(config); | 474 configs->push_back(config); |
(...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1352 | 1353 |
1353 return 0; | 1354 return 0; |
1354 } | 1355 } |
1355 | 1356 |
1356 #if !defined SK_BUILD_FOR_IOS | 1357 #if !defined SK_BUILD_FOR_IOS |
1357 int main(int argc, char** argv) { | 1358 int main(int argc, char** argv) { |
1358 SkCommandLineFlags::Parse(argc, argv); | 1359 SkCommandLineFlags::Parse(argc, argv); |
1359 return nanobench_main(); | 1360 return nanobench_main(); |
1360 } | 1361 } |
1361 #endif | 1362 #endif |
OLD | NEW |