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 828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
839 #endif | 839 #endif |
840 | 840 |
841 #define SINK(t, sink, ...) if (config->getBackend().equals(t)) { return new sink
(__VA_ARGS__); } | 841 #define SINK(t, sink, ...) if (config->getBackend().equals(t)) { return new sink
(__VA_ARGS__); } |
842 | 842 |
843 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK | 843 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK |
844 SINK("hwui", HWUISink); | 844 SINK("hwui", HWUISink); |
845 #endif | 845 #endif |
846 | 846 |
847 if (FLAGS_cpu) { | 847 if (FLAGS_cpu) { |
848 auto srgbColorSpace = SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named); | 848 auto srgbColorSpace = SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named); |
| 849 auto srgbLinearColorSpace = SkColorSpace::NewNamed(SkColorSpace::kSRGBLi
near_Named); |
849 | 850 |
850 SINK("565", RasterSink, kRGB_565_SkColorType); | 851 SINK("565", RasterSink, kRGB_565_SkColorType); |
851 SINK("8888", RasterSink, kN32_SkColorType); | 852 SINK("8888", RasterSink, kN32_SkColorType); |
852 SINK("srgb", RasterSink, kN32_SkColorType, srgbColorSpace); | 853 SINK("srgb", RasterSink, kN32_SkColorType, srgbColorSpace); |
853 SINK("f16", RasterSink, kRGBA_F16_SkColorType, srgbColorSpace->makeLine
arGamma()); | 854 SINK("f16", RasterSink, kRGBA_F16_SkColorType, srgbLinearColorSpace); |
854 SINK("pdf", PDFSink); | 855 SINK("pdf", PDFSink); |
855 SINK("skp", SKPSink); | 856 SINK("skp", SKPSink); |
856 SINK("pipe", PipeSink); | 857 SINK("pipe", PipeSink); |
857 SINK("svg", SVGSink); | 858 SINK("svg", SVGSink); |
858 SINK("null", NullSink); | 859 SINK("null", NullSink); |
859 SINK("xps", XPSSink); | 860 SINK("xps", XPSSink); |
860 SINK("pdfa", PDFSink, true); | 861 SINK("pdfa", PDFSink, true); |
861 } | 862 } |
862 #undef SINK | 863 #undef SINK |
863 return nullptr; | 864 return nullptr; |
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1426 #endif | 1427 #endif |
1427 } | 1428 } |
1428 } // namespace skiatest | 1429 } // namespace skiatest |
1429 | 1430 |
1430 #if !defined(SK_BUILD_FOR_IOS) | 1431 #if !defined(SK_BUILD_FOR_IOS) |
1431 int main(int argc, char** argv) { | 1432 int main(int argc, char** argv) { |
1432 SkCommandLineFlags::Parse(argc, argv); | 1433 SkCommandLineFlags::Parse(argc, argv); |
1433 return dm_main(); | 1434 return dm_main(); |
1434 } | 1435 } |
1435 #endif | 1436 #endif |
OLD | NEW |