Index: src/gpu/SkGpuDevice.cpp |
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp |
index 64df998e2fa6b4a38cf3489da0d3c48f2a7b151d..ca84121015a647ee5fd2d331c2d9579f1ba09cf5 100644 |
--- a/src/gpu/SkGpuDevice.cpp |
+++ b/src/gpu/SkGpuDevice.cpp |
@@ -1010,7 +1010,8 @@ void SkGpuDevice::drawBitmapTile(const SkBitmap& bitmap, |
} |
sk_sp<GrColorSpaceXform> colorSpaceXform = |
- GrColorSpaceXform::Make(bitmap.colorSpace(), fDrawContext->getColorSpace()); |
+ GrColorSpaceXform::Make(bitmap.colorSpace(), fDrawContext->getColorSpace(), |
+ bitmap.alphaType()); |
SkScalar iw = 1.f / texture->width(); |
SkScalar ih = 1.f / texture->height(); |
@@ -1134,8 +1135,12 @@ void SkGpuDevice::drawSpecial(const SkDraw& draw, |
SkPaint tmpUnfiltered(paint); |
tmpUnfiltered.setImageFilter(nullptr); |
+ sk_sp<GrColorSpaceXform> colorSpaceXform = |
+ GrColorSpaceXform::Make(result->getColorSpace(), fDrawContext->getColorSpace(), |
+ result->alphaType()); |
GrPaint grPaint; |
- sk_sp<GrFragmentProcessor> fp(GrSimpleTextureEffect::Make(texture.get(), nullptr, |
+ sk_sp<GrFragmentProcessor> fp(GrSimpleTextureEffect::Make(texture.get(), |
+ std::move(colorSpaceXform), |
SkMatrix::I())); |
if (GrPixelConfigIsAlphaOnly(texture->config())) { |
fp = GrFragmentProcessor::MulOutputByInputUnpremulColor(std::move(fp)); |