Index: dm/DM.cpp |
diff --git a/dm/DM.cpp b/dm/DM.cpp |
index 34f8a961e3f4c503182c95e49e2efad9bfaa2d40..d93cd2977e2ae65bee965187b6acbf70262fe153 100644 |
--- a/dm/DM.cpp |
+++ b/dm/DM.cpp |
@@ -819,6 +819,11 @@ static Sink* create_sink(const SkCommandLineConfig* config) { |
contextOptions = static_cast<GrContextFactory::GLContextOptions>( |
contextOptions | GrContextFactory::kEnableNVPR_GLContextOptions); |
} |
+ if (kSRGB_SkColorProfileType == gpuConfig->getProfileType() || |
+ kRGBA_F16_SkColorType == gpuConfig->getColorType()) { |
+ contextOptions = static_cast<GrContextFactory::GLContextOptions>( |
+ contextOptions | GrContextFactory::kRequireSRGBSupport_GLContextOptions); |
+ } |
GrContextFactory testFactory; |
if (!testFactory.get(contextType, contextOptions)) { |
info("WARNING: can not create GPU context for config '%s'. " |