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

Unified Diff: dm/DM.cpp

Issue 2069173002: Lots of progress switching to SkColorSpace rather than SkColorProfileType (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix bad assert Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « bench/nanobench.cpp ('k') | dm/DMSrcSink.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « bench/nanobench.cpp ('k') | dm/DMSrcSink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698