aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects/SkMorphologyImageFilter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/effects/SkMorphologyImageFilter.cpp')
-rw-r--r--src/effects/SkMorphologyImageFilter.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp
index 4e6032fa5a..f6d400111c 100644
--- a/src/effects/SkMorphologyImageFilter.cpp
+++ b/src/effects/SkMorphologyImageFilter.cpp
@@ -22,6 +22,7 @@
#include "GrInvariantOutput.h"
#include "GrTexture.h"
#include "SkGr.h"
+#include "SkGrPriv.h"
#include "effects/Gr1DKernelEffect.h"
#include "glsl/GrGLSLFragmentProcessor.h"
#include "glsl/GrGLSLFragmentShaderBuilder.h"
@@ -476,6 +477,7 @@ static sk_sp<SkSpecialImage> apply_morphology(GrContext* context,
sk_sp<GrTexture> srcTexture(input->asTextureRef(context));
SkASSERT(srcTexture);
sk_sp<SkColorSpace> colorSpace = sk_ref_sp(input->getColorSpace());
+ GrPixelConfig config = GrRenderableConfigForColorSpace(colorSpace.get());
// setup new clip
const GrFixedClip clip(SkIRect::MakeWH(srcTexture->width(), srcTexture->height()));
@@ -488,8 +490,7 @@ static sk_sp<SkSpecialImage> apply_morphology(GrContext* context,
if (radius.fWidth > 0) {
sk_sp<GrDrawContext> dstDrawContext(context->makeDrawContext(SkBackingFit::kApprox,
rect.width(), rect.height(),
- kSkia8888_GrPixelConfig,
- colorSpace));
+ config, colorSpace));
if (!dstDrawContext) {
return nullptr;
}
@@ -510,8 +511,7 @@ static sk_sp<SkSpecialImage> apply_morphology(GrContext* context,
if (radius.fHeight > 0) {
sk_sp<GrDrawContext> dstDrawContext(context->makeDrawContext(SkBackingFit::kApprox,
rect.width(), rect.height(),
- kSkia8888_GrPixelConfig,
- colorSpace));
+ config, colorSpace));
if (!dstDrawContext) {
return nullptr;
}