Index: dm/DMSrcSink.cpp |
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp |
index 97f1e4866444792f5c8ecc437bd521f7d200835a..8afbfb9f2f92d61110251a1c06adafc194d7817f 100644 |
--- a/dm/DMSrcSink.cpp |
+++ b/dm/DMSrcSink.cpp |
@@ -886,9 +886,12 @@ Error ColorCodecSrc::draw(SkCanvas* canvas) const { |
case kBaseline_Mode: |
canvas->drawBitmap(bitmap, 0, 0); |
break; |
+ case kDst_sRGB_Mode: |
case kDst_HPZR30w_Mode: { |
sk_sp<SkColorSpace> srcSpace = sk_ref_sp(codec->getColorSpace()); |
- sk_sp<SkColorSpace> dstSpace = SkColorSpace::NewICC(dstData->data(), dstData->size()); |
+ sk_sp<SkColorSpace> dstSpace = (kDst_sRGB_Mode == fMode) ? |
+ SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named) : |
+ SkColorSpace::NewICC(dstData->data(), dstData->size()); |
SkASSERT(dstSpace); |
std::unique_ptr<SkColorSpaceXform> xform = SkColorSpaceXform::New(srcSpace, dstSpace); |