Index: src/gpu/SkGpuDevice.cpp |
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp |
index 20e5afef9fc613bad1a5187f52fd13581072cbb1..873256d15f848164c0394f387f3dc64947425afb 100644 |
--- a/src/gpu/SkGpuDevice.cpp |
+++ b/src/gpu/SkGpuDevice.cpp |
@@ -1104,9 +1104,8 @@ void SkGpuDevice::internalDrawBitmap(const SkBitmap& bitmap, |
return; |
} |
- SkColorSpace* dstColorSpace = nullptr; // XFORMTODO |
- sk_sp<GrColorSpaceXform> colorSpaceXform = GrColorSpaceXform::Make(bitmap.colorSpace(), |
- dstColorSpace); |
+ sk_sp<GrColorSpaceXform> colorSpaceXform = |
+ GrColorSpaceXform::Make(bitmap.colorSpace(), fDrawContext->getColorSpace()); |
SkRect dstRect = {0, 0, srcRect.width(), srcRect.height() }; |
SkRect paintRect; |
SkScalar wInv = SkScalarInvert(SkIntToScalar(texture->width())); |
@@ -1545,7 +1544,7 @@ void SkGpuDevice::drawProducerNine(const SkDraw& draw, GrTextureProducer* produc |
producer->createFragmentProcessor(SkMatrix::I(), |
SkRect::MakeIWH(producer->width(), producer->height()), |
GrTextureProducer::kNo_FilterConstraint, true, |
- &kMode, gammaTreatment)); |
+ &kMode, fDrawContext->getColorSpace(), gammaTreatment)); |
GrPaint grPaint; |
if (!SkPaintToGrPaintWithTexture(this->context(), paint, *draw.fMatrix, std::move(fp), |
producer->isAlphaOnly(), gammaCorrect, &grPaint)) { |