OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 "CrashHandler.h" | 8 #include "CrashHandler.h" |
9 #include "DMJsonWriter.h" | 9 #include "DMJsonWriter.h" |
10 #include "DMSrcSink.h" | 10 #include "DMSrcSink.h" |
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 for (float scale : nativeScales) { | 540 for (float scale : nativeScales) { |
541 for (CodecSrc::DstColorType colorType : colorTypes) { | 541 for (CodecSrc::DstColorType colorType : colorTypes) { |
542 for (SkAlphaType alphaType : alphaModes) { | 542 for (SkAlphaType alphaType : alphaModes) { |
543 // Only test kCroppedScanline_Mode when the alpha type is op
aque. The test is | 543 // Only test kCroppedScanline_Mode when the alpha type is op
aque. The test is |
544 // slow and won't be interestingly different with different
alpha types. | 544 // slow and won't be interestingly different with different
alpha types. |
545 if (CodecSrc::kCroppedScanline_Mode == mode && | 545 if (CodecSrc::kCroppedScanline_Mode == mode && |
546 kOpaque_SkAlphaType != alphaType) { | 546 kOpaque_SkAlphaType != alphaType) { |
547 continue; | 547 continue; |
548 } | 548 } |
549 | 549 |
| 550 // Skip kNonNative on different native scales. It won't be
interestingly |
| 551 // different. |
| 552 if (CodecSrc::kNonNative8888_Always_DstColorType == colorTyp
e && 1.0f != scale) |
| 553 { |
| 554 continue; |
| 555 } |
| 556 |
550 push_codec_src(path, mode, colorType, alphaType, scale); | 557 push_codec_src(path, mode, colorType, alphaType, scale); |
551 } | 558 } |
552 } | 559 } |
553 } | 560 } |
554 } | 561 } |
555 | 562 |
556 if (FLAGS_simpleCodec) { | 563 if (FLAGS_simpleCodec) { |
557 return; | 564 return; |
558 } | 565 } |
559 | 566 |
(...skipping 10 matching lines...) Expand all Loading... |
570 subset = true; | 577 subset = true; |
571 break; | 578 break; |
572 } | 579 } |
573 } | 580 } |
574 | 581 |
575 const int sampleSizes[] = { 1, 2, 3, 4, 5, 6, 7, 8 }; | 582 const int sampleSizes[] = { 1, 2, 3, 4, 5, 6, 7, 8 }; |
576 | 583 |
577 for (int sampleSize : sampleSizes) { | 584 for (int sampleSize : sampleSizes) { |
578 for (CodecSrc::DstColorType colorType : colorTypes) { | 585 for (CodecSrc::DstColorType colorType : colorTypes) { |
579 for (SkAlphaType alphaType : alphaModes) { | 586 for (SkAlphaType alphaType : alphaModes) { |
| 587 // We can exercise all of the kNonNative support code in the swi
zzler with just a |
| 588 // few sample sizes. Skip the rest. |
| 589 if (CodecSrc::kNonNative8888_Always_DstColorType == colorType &&
sampleSize > 3) { |
| 590 continue; |
| 591 } |
| 592 |
580 push_android_codec_src(path, AndroidCodecSrc::kFullImage_Mode, c
olorType, | 593 push_android_codec_src(path, AndroidCodecSrc::kFullImage_Mode, c
olorType, |
581 alphaType, sampleSize); | 594 alphaType, sampleSize); |
582 if (subset) { | 595 if (subset) { |
583 push_android_codec_src(path, AndroidCodecSrc::kDivisor_Mode,
colorType, | 596 push_android_codec_src(path, AndroidCodecSrc::kDivisor_Mode,
colorType, |
584 alphaType, sampleSize); | 597 alphaType, sampleSize); |
585 } | 598 } |
586 } | 599 } |
587 } | 600 } |
588 } | 601 } |
589 | 602 |
(...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1418 #endif | 1431 #endif |
1419 } | 1432 } |
1420 } // namespace skiatest | 1433 } // namespace skiatest |
1421 | 1434 |
1422 #if !defined(SK_BUILD_FOR_IOS) | 1435 #if !defined(SK_BUILD_FOR_IOS) |
1423 int main(int argc, char** argv) { | 1436 int main(int argc, char** argv) { |
1424 SkCommandLineFlags::Parse(argc, argv); | 1437 SkCommandLineFlags::Parse(argc, argv); |
1425 return dm_main(); | 1438 return dm_main(); |
1426 } | 1439 } |
1427 #endif | 1440 #endif |
OLD | NEW |