| Index: src/effects/SkLightingImageFilter.cpp
|
| diff --git a/src/effects/SkLightingImageFilter.cpp b/src/effects/SkLightingImageFilter.cpp
|
| index 6efb0f6c4e1a33f0fdaf7e5c6cc1e663c3588241..7223ae5a1e4a3d7cddd2e05a4b7698dc732046f4 100644
|
| --- a/src/effects/SkLightingImageFilter.cpp
|
| +++ b/src/effects/SkLightingImageFilter.cpp
|
| @@ -407,10 +407,18 @@
|
| sk_sp<GrTexture> inputTexture(input->asTextureRef(context));
|
| SkASSERT(inputTexture);
|
|
|
| - sk_sp<GrDrawContext> drawContext(context->newDrawContext(GrContext::kLoose_BackingFit,
|
| - offsetBounds.width(),
|
| - offsetBounds.height(),
|
| - kRGBA_8888_GrPixelConfig));
|
| + GrSurfaceDesc desc;
|
| + desc.fFlags = kRenderTarget_GrSurfaceFlag,
|
| + desc.fWidth = offsetBounds.width();
|
| + desc.fHeight = offsetBounds.height();
|
| + desc.fConfig = kRGBA_8888_GrPixelConfig;
|
| +
|
| + sk_sp<GrTexture> dst(context->textureProvider()->createApproxTexture(desc));
|
| + if (!dst) {
|
| + return nullptr;
|
| + }
|
| +
|
| + sk_sp<GrDrawContext> drawContext(context->drawContext(sk_ref_sp(dst->asRenderTarget())));
|
| if (!drawContext) {
|
| return nullptr;
|
| }
|
| @@ -454,7 +462,7 @@
|
|
|
| return SkSpecialImage::MakeFromGpu(SkIRect::MakeWH(offsetBounds.width(), offsetBounds.height()),
|
| kNeedNewImageUniqueID_SpecialImage,
|
| - drawContext->asTexture());
|
| + std::move(dst));
|
| }
|
| #endif
|
|
|
|
|