Index: src/image/SkImageShader.cpp |
diff --git a/src/image/SkImageShader.cpp b/src/image/SkImageShader.cpp |
index db2bacb4ef4d96e9c2db5e02184c5463d1086d7a..9afd2073602fba7113436e14273fbfd226f6f4bd 100644 |
--- a/src/image/SkImageShader.cpp |
+++ b/src/image/SkImageShader.cpp |
@@ -214,11 +214,15 @@ sk_sp<GrFragmentProcessor> SkImageShader::asFragmentProcessor(const AsFPArgs& ar |
return nullptr; |
} |
+ SkImageInfo info = as_IB(fImage)->onImageInfo(); |
+ sk_sp<GrColorSpaceXform> colorSpaceXform = GrColorSpaceXform::Make(info.colorSpace(), |
+ args.fDstColorSpace, |
+ info.alphaType()); |
sk_sp<GrFragmentProcessor> inner; |
if (doBicubic) { |
- inner = GrBicubicEffect::Make(texture, nullptr, matrix, tm); |
+ inner = GrBicubicEffect::Make(texture, std::move(colorSpaceXform), matrix, tm); |
} else { |
- inner = GrSimpleTextureEffect::Make(texture, nullptr, matrix, params); |
+ inner = GrSimpleTextureEffect::Make(texture, std::move(colorSpaceXform), matrix, params); |
} |
if (GrPixelConfigIsAlphaOnly(texture->config())) { |