| Index: dm/DM.cpp
|
| diff --git a/dm/DM.cpp b/dm/DM.cpp
|
| index 97b6eb8f6ab8d3d9f9a69cf75d9f5c3e0211ede6..47fd679f070a668e27f73a382e1fe0d067d4535e 100644
|
| --- a/dm/DM.cpp
|
| +++ b/dm/DM.cpp
|
| @@ -821,8 +821,8 @@ 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()) {
|
| + if (SkColorAndProfileAreGammaCorrect(gpuConfig->getColorType(),
|
| + gpuConfig->getProfileType())) {
|
| contextOptions = static_cast<GrContextFactory::GLContextOptions>(
|
| contextOptions | GrContextFactory::kRequireSRGBSupport_GLContextOptions);
|
| }
|
| @@ -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;
|
|
|