aboutsummaryrefslogtreecommitdiffhomepage
path: root/dm/DM.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dm/DM.cpp')
-rw-r--r--dm/DM.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/dm/DM.cpp b/dm/DM.cpp
index 158d256fad..69044080b5 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);