Index: src/effects/SkDisplacementMapEffect.cpp |
diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp |
index 0f49a991c22e9a0c6c938d0b5409b7fb62042f47..8fc0ec1366c877bcdfdc02842cfa95558aa906a8 100644 |
--- a/src/effects/SkDisplacementMapEffect.cpp |
+++ b/src/effects/SkDisplacementMapEffect.cpp |
@@ -336,10 +336,11 @@ sk_sp<SkSpecialImage> SkDisplacementMapEffect::onFilterImage(SkSpecialImage* sou |
SkMatrix matrix; |
matrix.setTranslate(-SkIntToScalar(colorBounds.x()), -SkIntToScalar(colorBounds.y())); |
+ SkColorSpace* colorSpace = ctx.outputProperties().colorSpace(); |
sk_sp<GrDrawContext> drawContext( |
context->makeDrawContext(SkBackingFit::kApprox, bounds.width(), bounds.height(), |
- GrRenderableConfigForColorSpace(source->getColorSpace()), |
- sk_ref_sp(source->getColorSpace()))); |
+ GrRenderableConfigForColorSpace(colorSpace), |
+ sk_ref_sp(colorSpace))); |
if (!drawContext) { |
return nullptr; |
} |