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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 break; | 358 break; |
359 } | 359 } |
360 | 360 |
361 switch (dstColorType) { | 361 switch (dstColorType) { |
362 case CodecSrc::kGrayscale_Always_DstColorType: | 362 case CodecSrc::kGrayscale_Always_DstColorType: |
363 folder.append("_kGray8"); | 363 folder.append("_kGray8"); |
364 break; | 364 break; |
365 case CodecSrc::kIndex8_Always_DstColorType: | 365 case CodecSrc::kIndex8_Always_DstColorType: |
366 folder.append("_kIndex8"); | 366 folder.append("_kIndex8"); |
367 break; | 367 break; |
| 368 case CodecSrc::kNonNative8888_Always_DstColorType: |
| 369 folder.append("_kNonNative"); |
| 370 break; |
368 default: | 371 default: |
369 break; | 372 break; |
370 } | 373 } |
371 | 374 |
372 switch (dstAlphaType) { | 375 switch (dstAlphaType) { |
373 case kOpaque_SkAlphaType: | 376 case kOpaque_SkAlphaType: |
374 folder.append("_opaque"); | 377 folder.append("_opaque"); |
375 break; | 378 break; |
376 case kPremul_SkAlphaType: | 379 case kPremul_SkAlphaType: |
377 folder.append("_premul"); | 380 folder.append("_premul"); |
(...skipping 25 matching lines...) Expand all Loading... |
403 break; | 406 break; |
404 } | 407 } |
405 | 408 |
406 switch (dstColorType) { | 409 switch (dstColorType) { |
407 case CodecSrc::kGrayscale_Always_DstColorType: | 410 case CodecSrc::kGrayscale_Always_DstColorType: |
408 folder.append("_kGray8"); | 411 folder.append("_kGray8"); |
409 break; | 412 break; |
410 case CodecSrc::kIndex8_Always_DstColorType: | 413 case CodecSrc::kIndex8_Always_DstColorType: |
411 folder.append("_kIndex8"); | 414 folder.append("_kIndex8"); |
412 break; | 415 break; |
| 416 case CodecSrc::kNonNative8888_Always_DstColorType: |
| 417 folder.append("_kNonNative"); |
| 418 break; |
413 default: | 419 default: |
414 break; | 420 break; |
415 } | 421 } |
416 | 422 |
417 switch (dstAlphaType) { | 423 switch (dstAlphaType) { |
418 case kOpaque_SkAlphaType: | 424 case kOpaque_SkAlphaType: |
419 folder.append("_opaque"); | 425 folder.append("_opaque"); |
420 break; | 426 break; |
421 case kPremul_SkAlphaType: | 427 case kPremul_SkAlphaType: |
422 folder.append("_premul"); | 428 folder.append("_premul"); |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 case SkEncodedFormat::kDNG_SkEncodedFormat: | 507 case SkEncodedFormat::kDNG_SkEncodedFormat: |
502 break; | 508 break; |
503 default: | 509 default: |
504 nativeModes.push_back(CodecSrc::kScanline_Mode); | 510 nativeModes.push_back(CodecSrc::kScanline_Mode); |
505 nativeModes.push_back(CodecSrc::kStripe_Mode); | 511 nativeModes.push_back(CodecSrc::kStripe_Mode); |
506 break; | 512 break; |
507 } | 513 } |
508 | 514 |
509 SkTArray<CodecSrc::DstColorType> colorTypes; | 515 SkTArray<CodecSrc::DstColorType> colorTypes; |
510 colorTypes.push_back(CodecSrc::kGetFromCanvas_DstColorType); | 516 colorTypes.push_back(CodecSrc::kGetFromCanvas_DstColorType); |
| 517 colorTypes.push_back(CodecSrc::kNonNative8888_Always_DstColorType); |
511 switch (codec->getInfo().colorType()) { | 518 switch (codec->getInfo().colorType()) { |
512 case kGray_8_SkColorType: | 519 case kGray_8_SkColorType: |
513 colorTypes.push_back(CodecSrc::kGrayscale_Always_DstColorType); | 520 colorTypes.push_back(CodecSrc::kGrayscale_Always_DstColorType); |
514 if (kWBMP_SkEncodedFormat == codec->getEncodedFormat()) { | 521 if (kWBMP_SkEncodedFormat == codec->getEncodedFormat()) { |
515 colorTypes.push_back(CodecSrc::kIndex8_Always_DstColorType); | 522 colorTypes.push_back(CodecSrc::kIndex8_Always_DstColorType); |
516 } | 523 } |
517 break; | 524 break; |
518 case kIndex_8_SkColorType: | 525 case kIndex_8_SkColorType: |
519 colorTypes.push_back(CodecSrc::kIndex8_Always_DstColorType); | 526 colorTypes.push_back(CodecSrc::kIndex8_Always_DstColorType); |
520 break; | 527 break; |
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1411 #endif | 1418 #endif |
1412 } | 1419 } |
1413 } // namespace skiatest | 1420 } // namespace skiatest |
1414 | 1421 |
1415 #if !defined(SK_BUILD_FOR_IOS) | 1422 #if !defined(SK_BUILD_FOR_IOS) |
1416 int main(int argc, char** argv) { | 1423 int main(int argc, char** argv) { |
1417 SkCommandLineFlags::Parse(argc, argv); | 1424 SkCommandLineFlags::Parse(argc, argv); |
1418 return dm_main(); | 1425 return dm_main(); |
1419 } | 1426 } |
1420 #endif | 1427 #endif |
OLD | NEW |