Index: dm/DM.cpp |
diff --git a/dm/DM.cpp b/dm/DM.cpp |
index 158d256fad89ff62d150160b9b6e9c07200bcf2b..69044080b58d3cbdcfe71cbe598226a03c38f517 100644 |
--- a/dm/DM.cpp |
+++ b/dm/DM.cpp |
@@ -802,8 +802,8 @@ static Sink* create_sink(const SkCommandLineConfig* config) { |
contextOptions = static_cast<GrContextFactory::ContextOptions>( |
contextOptions | GrContextFactory::kEnableNVPR_ContextOptions); |
} |
- if (SkColorAndProfileAreGammaCorrect(gpuConfig->getColorType(), |
- gpuConfig->getProfileType())) { |
+ if (SkColorAndColorSpaceAreGammaCorrect(gpuConfig->getColorType(), |
+ gpuConfig->getColorSpace())) { |
contextOptions = static_cast<GrContextFactory::ContextOptions>( |
contextOptions | GrContextFactory::kRequireSRGBSupport_ContextOptions); |
} |
@@ -815,7 +815,7 @@ static Sink* create_sink(const SkCommandLineConfig* config) { |
} |
return new GPUSink(contextType, contextOptions, gpuConfig->getSamples(), |
gpuConfig->getUseDIText(), gpuConfig->getColorType(), |
- gpuConfig->getProfileType(), FLAGS_gpu_threading); |
+ sk_ref_sp(gpuConfig->getColorSpace()), FLAGS_gpu_threading); |
} |
} |
#endif |
@@ -827,9 +827,11 @@ static Sink* create_sink(const SkCommandLineConfig* config) { |
#endif |
if (FLAGS_cpu) { |
+ auto srgbColorSpace = SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named); |
+ |
SINK("565", RasterSink, kRGB_565_SkColorType); |
SINK("8888", RasterSink, kN32_SkColorType); |
- SINK("srgb", RasterSink, kN32_SkColorType, kSRGB_SkColorProfileType); |
+ SINK("srgb", RasterSink, kN32_SkColorType, srgbColorSpace); |
SINK("f16", RasterSink, kRGBA_F16_SkColorType); |
SINK("pdf", PDFSink); |
SINK("skp", SKPSink); |