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 "DMJsonWriter.h" | 8 #include "DMJsonWriter.h" |
9 #include "DMSrcSink.h" | 9 #include "DMSrcSink.h" |
10 #include "DMSrcSinkAndroid.h" | 10 #include "DMSrcSinkAndroid.h" |
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
756 } | 756 } |
757 | 757 |
758 SkTArray<SkString> colorImages; | 758 SkTArray<SkString> colorImages; |
759 if (!CollectImages(FLAGS_colorImages, &colorImages)) { | 759 if (!CollectImages(FLAGS_colorImages, &colorImages)) { |
760 return false; | 760 return false; |
761 } | 761 } |
762 | 762 |
763 for (auto colorImage : colorImages) { | 763 for (auto colorImage : colorImages) { |
764 ColorCodecSrc* src = new ColorCodecSrc(colorImage, ColorCodecSrc::kBasel
ine_Mode, | 764 ColorCodecSrc* src = new ColorCodecSrc(colorImage, ColorCodecSrc::kBasel
ine_Mode, |
765 kN32_SkColorType); | 765 kN32_SkColorType); |
766 push_src("image", "color_codec_baseline", src); | 766 push_src("colorImage", "color_codec_baseline", src); |
767 | 767 |
768 src = new ColorCodecSrc(colorImage, ColorCodecSrc::kDst_HPZR30w_Mode, kN
32_SkColorType); | 768 src = new ColorCodecSrc(colorImage, ColorCodecSrc::kDst_HPZR30w_Mode, kN
32_SkColorType); |
769 push_src("image", "color_codec_HPZR30w", src); | 769 push_src("colorImage", "color_codec_HPZR30w", src); |
770 // TODO (msarett): | 770 // TODO (msarett): |
771 // Should we test this Dst in F16 mode (even though the Dst gamma is 2.2
instead of sRGB)? | 771 // Should we test this Dst in F16 mode (even though the Dst gamma is 2.2
instead of sRGB)? |
772 | 772 |
773 src = new ColorCodecSrc(colorImage, ColorCodecSrc::kDst_sRGB_Mode, kN32_
SkColorType); | 773 src = new ColorCodecSrc(colorImage, ColorCodecSrc::kDst_sRGB_Mode, kN32_
SkColorType); |
774 push_src("image", "color_codec_sRGB_kN32", src); | 774 push_src("colorImage", "color_codec_sRGB_kN32", src); |
775 src = new ColorCodecSrc(colorImage, ColorCodecSrc::kDst_sRGB_Mode, kRGBA
_F16_SkColorType); | 775 src = new ColorCodecSrc(colorImage, ColorCodecSrc::kDst_sRGB_Mode, kRGBA
_F16_SkColorType); |
776 push_src("image", "color_codec_sRGB_kF16", src); | 776 push_src("colorImage", "color_codec_sRGB_kF16", src); |
777 | 777 |
778 #if defined(SK_TEST_QCMS) | 778 #if defined(SK_TEST_QCMS) |
779 src = new ColorCodecSrc(colorImage, ColorCodecSrc::kQCMS_HPZR30w_Mode, | 779 src = new ColorCodecSrc(colorImage, ColorCodecSrc::kQCMS_HPZR30w_Mode, |
780 kRGBA_8888_SkColorType); | 780 kRGBA_8888_SkColorType); |
781 push_src("image", "color_codec_QCMS_HPZR30w", src); | 781 push_src("colorImage", "color_codec_QCMS_HPZR30w", src); |
782 #endif | 782 #endif |
783 } | 783 } |
784 | 784 |
785 return true; | 785 return true; |
786 } | 786 } |
787 | 787 |
788 static void push_sink(const SkCommandLineConfig& config, Sink* s) { | 788 static void push_sink(const SkCommandLineConfig& config, Sink* s) { |
789 SkAutoTDelete<Sink> sink(s); | 789 SkAutoTDelete<Sink> sink(s); |
790 | 790 |
791 // Try a simple Src as a canary. If it fails, skip this sink. | 791 // Try a simple Src as a canary. If it fails, skip this sink. |
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1434 #endif | 1434 #endif |
1435 } | 1435 } |
1436 } // namespace skiatest | 1436 } // namespace skiatest |
1437 | 1437 |
1438 #if !defined(SK_BUILD_FOR_IOS) | 1438 #if !defined(SK_BUILD_FOR_IOS) |
1439 int main(int argc, char** argv) { | 1439 int main(int argc, char** argv) { |
1440 SkCommandLineFlags::Parse(argc, argv); | 1440 SkCommandLineFlags::Parse(argc, argv); |
1441 return dm_main(); | 1441 return dm_main(); |
1442 } | 1442 } |
1443 #endif | 1443 #endif |
OLD | NEW |