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 706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
717 if (ext && brd_supported(ext+1)) { | 717 if (ext && brd_supported(ext+1)) { |
718 push_brd_srcs(image); | 718 push_brd_srcs(image); |
719 } | 719 } |
720 } | 720 } |
721 | 721 |
722 SkTArray<SkString> colorImages; | 722 SkTArray<SkString> colorImages; |
723 if (!CollectImages(FLAGS_colorImages, &colorImages)) { | 723 if (!CollectImages(FLAGS_colorImages, &colorImages)) { |
724 return false; | 724 return false; |
725 } | 725 } |
726 | 726 |
727 // Load the dstSpace. This particular dst is fairly similar to Adobe RGB. | |
728 SkAutoTUnref<SkData> data(SkData::NewFromFileName( | |
729 GetResourcePath("monitor_profiles/HP_ZR30w.icc").c_str())); | |
730 sk_sp<SkColorSpace> dstSpace = SkColorSpace::NewICC(data->data(), data->size
()); | |
731 SkASSERT(dstSpace); | |
732 | |
733 for (auto colorImage : colorImages) { | 727 for (auto colorImage : colorImages) { |
734 ColorCodecSrc* src = new ColorCodecSrc(colorImage, ColorCodecSrc::kBasel
ine_Mode, nullptr); | 728 ColorCodecSrc* src = new ColorCodecSrc(colorImage, ColorCodecSrc::kBasel
ine_Mode); |
735 push_src("image", "color_codec_baseline", src); | 729 push_src("image", "color_codec_baseline", src); |
736 | 730 |
737 src = new ColorCodecSrc(colorImage, ColorCodecSrc::kDst_HPZR30w_Mode, ds
tSpace); | 731 src = new ColorCodecSrc(colorImage, ColorCodecSrc::kDst_HPZR30w_Mode); |
738 push_src("image", "color_codec_HPZR30w", src); | 732 push_src("image", "color_codec_HPZR30w", src); |
| 733 |
| 734 #if !defined(GOOGLE3) |
| 735 src = new ColorCodecSrc(colorImage, ColorCodecSrc::kQCMS_HPZR30w_Mode); |
| 736 push_src("image", "color_codec_QCMS_HPZR30w", src); |
| 737 #endif |
739 } | 738 } |
740 | 739 |
741 return true; | 740 return true; |
742 } | 741 } |
743 | 742 |
744 static void push_sink(const SkCommandLineConfig& config, Sink* s) { | 743 static void push_sink(const SkCommandLineConfig& config, Sink* s) { |
745 SkAutoTDelete<Sink> sink(s); | 744 SkAutoTDelete<Sink> sink(s); |
746 | 745 |
747 // Try a simple Src as a canary. If it fails, skip this sink. | 746 // Try a simple Src as a canary. If it fails, skip this sink. |
748 struct : public Src { | 747 struct : public Src { |
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1389 #endif | 1388 #endif |
1390 } | 1389 } |
1391 } // namespace skiatest | 1390 } // namespace skiatest |
1392 | 1391 |
1393 #if !defined(SK_BUILD_FOR_IOS) | 1392 #if !defined(SK_BUILD_FOR_IOS) |
1394 int main(int argc, char** argv) { | 1393 int main(int argc, char** argv) { |
1395 SkCommandLineFlags::Parse(argc, argv); | 1394 SkCommandLineFlags::Parse(argc, argv); |
1396 return dm_main(); | 1395 return dm_main(); |
1397 } | 1396 } |
1398 #endif | 1397 #endif |
OLD | NEW |