| Index: dm/DM.cpp
|
| diff --git a/dm/DM.cpp b/dm/DM.cpp
|
| index 00cb279e8116d6567365b81c48696f85daa0634e..54e1851eab11656820ecbd84572c80f1d7042e8d 100644
|
| --- a/dm/DM.cpp
|
| +++ b/dm/DM.cpp
|
| @@ -821,8 +821,8 @@ static Sink* create_sink(const SkCommandLineConfig* config) {
|
| contextOptions = static_cast<GrContextFactory::ContextOptions>(
|
| contextOptions | GrContextFactory::kEnableNVPR_ContextOptions);
|
| }
|
| - if (kSRGB_SkColorProfileType == gpuConfig->getProfileType() ||
|
| - kRGBA_F16_SkColorType == gpuConfig->getColorType()) {
|
| + if (SkColorAndProfileAreGammaCorrect(gpuConfig->getColorType(),
|
| + gpuConfig->getProfileType())) {
|
| contextOptions = static_cast<GrContextFactory::ContextOptions>(
|
| contextOptions | GrContextFactory::kRequireSRGBSupport_ContextOptions);
|
| }
|
| @@ -1168,8 +1168,7 @@ struct Task {
|
| const SkBitmap* bitmap) {
|
| bool gammaCorrect = false;
|
| if (bitmap) {
|
| - gammaCorrect = bitmap->profileType() == kSRGB_SkColorProfileType
|
| - || bitmap-> colorType() == kRGBA_F16_SkColorType;
|
| + gammaCorrect = SkImageInfoIsGammaCorrect(bitmap->info());
|
| }
|
|
|
| JsonWriter::BitmapResult result;
|
|
|