Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(623)

Side by Side Diff: dm/DM.cpp

Issue 2147763002: Add capability for SkColorXform to output half floats (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Call swizzle fn Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « bench/ColorCodecBench.cpp ('k') | dm/DMSrcSink.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 722 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 push_brd_srcs(image); 733 push_brd_srcs(image);
734 } 734 }
735 } 735 }
736 736
737 SkTArray<SkString> colorImages; 737 SkTArray<SkString> colorImages;
738 if (!CollectImages(FLAGS_colorImages, &colorImages)) { 738 if (!CollectImages(FLAGS_colorImages, &colorImages)) {
739 return false; 739 return false;
740 } 740 }
741 741
742 for (auto colorImage : colorImages) { 742 for (auto colorImage : colorImages) {
743 ColorCodecSrc* src = new ColorCodecSrc(colorImage, ColorCodecSrc::kBasel ine_Mode); 743 ColorCodecSrc* src = new ColorCodecSrc(colorImage, ColorCodecSrc::kBasel ine_Mode,
744 kN32_SkColorType);
744 push_src("image", "color_codec_baseline", src); 745 push_src("image", "color_codec_baseline", src);
745 746
746 src = new ColorCodecSrc(colorImage, ColorCodecSrc::kDst_HPZR30w_Mode); 747 src = new ColorCodecSrc(colorImage, ColorCodecSrc::kDst_HPZR30w_Mode, kN 32_SkColorType);
747 push_src("image", "color_codec_HPZR30w", src); 748 push_src("image", "color_codec_HPZR30w", src);
749 // TODO (msarett):
750 // Should we test this Dst in F16 mode (even though the Dst gamma is 2.2 instead of sRGB)?
748 751
749 src = new ColorCodecSrc(colorImage, ColorCodecSrc::kDst_sRGB_Mode); 752 src = new ColorCodecSrc(colorImage, ColorCodecSrc::kDst_sRGB_Mode, kN32_ SkColorType);
750 push_src("image", "color_codec_sRGB", src); 753 push_src("image", "color_codec_sRGB_kN32", src);
754 src = new ColorCodecSrc(colorImage, ColorCodecSrc::kDst_sRGB_Mode, kRGBA _F16_SkColorType);
755 push_src("image", "color_codec_sRGB_kF16", src);
751 756
752 #if defined(SK_TEST_QCMS) 757 #if defined(SK_TEST_QCMS)
753 src = new ColorCodecSrc(colorImage, ColorCodecSrc::kQCMS_HPZR30w_Mode); 758 src = new ColorCodecSrc(colorImage, ColorCodecSrc::kQCMS_HPZR30w_Mode, k N32_SkColorType);
754 push_src("image", "color_codec_QCMS_HPZR30w", src); 759 push_src("image", "color_codec_QCMS_HPZR30w", src);
755 #endif 760 #endif
756 } 761 }
757 762
758 return true; 763 return true;
759 } 764 }
760 765
761 static void push_sink(const SkCommandLineConfig& config, Sink* s) { 766 static void push_sink(const SkCommandLineConfig& config, Sink* s) {
762 SkAutoTDelete<Sink> sink(s); 767 SkAutoTDelete<Sink> sink(s);
763 768
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
1403 #endif 1408 #endif
1404 } 1409 }
1405 } // namespace skiatest 1410 } // namespace skiatest
1406 1411
1407 #if !defined(SK_BUILD_FOR_IOS) 1412 #if !defined(SK_BUILD_FOR_IOS)
1408 int main(int argc, char** argv) { 1413 int main(int argc, char** argv) {
1409 SkCommandLineFlags::Parse(argc, argv); 1414 SkCommandLineFlags::Parse(argc, argv);
1410 return dm_main(); 1415 return dm_main();
1411 } 1416 }
1412 #endif 1417 #endif
OLDNEW
« no previous file with comments | « bench/ColorCodecBench.cpp ('k') | dm/DMSrcSink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698