Index: src/effects/SkAlphaThresholdFilter.cpp |
diff --git a/src/effects/SkAlphaThresholdFilter.cpp b/src/effects/SkAlphaThresholdFilter.cpp |
index b1c8b214609af956510482517706792a6f8ec079..092f469d12d2f7630ca589706666e1377cc679ba 100644 |
--- a/src/effects/SkAlphaThresholdFilter.cpp |
+++ b/src/effects/SkAlphaThresholdFilter.cpp |
@@ -18,6 +18,7 @@ |
#include "GrContext.h" |
#include "GrRenderTargetContext.h" |
#include "GrFixedClip.h" |
+#include "GrTextureProxy.h" |
#endif |
class SK_API SkAlphaThresholdFilterImpl : public SkImageFilter { |
@@ -37,7 +38,9 @@ protected: |
SkIPoint* offset) const override; |
#if SK_SUPPORT_GPU |
- sk_sp<GrTexture> createMaskTexture(GrContext*, const SkMatrix&, const SkIRect& bounds) const; |
+ sk_sp<GrTextureProxy> createMaskTexture(GrContext*, |
+ const SkMatrix&, |
+ const SkIRect& bounds) const; |
#endif |
private: |
@@ -93,10 +96,9 @@ SkAlphaThresholdFilterImpl::SkAlphaThresholdFilterImpl(const SkRegion& region, |
} |
#if SK_SUPPORT_GPU |
-sk_sp<GrTexture> SkAlphaThresholdFilterImpl::createMaskTexture(GrContext* context, |
- const SkMatrix& inMatrix, |
- const SkIRect& bounds) const { |
- |
+sk_sp<GrTextureProxy> SkAlphaThresholdFilterImpl::createMaskTexture(GrContext* context, |
+ const SkMatrix& inMatrix, |
+ const SkIRect& bounds) const { |
sk_sp<GrRenderTargetContext> renderTargetContext(context->makeRenderTargetContextWithFallback( |
SkBackingFit::kApprox, bounds.width(), bounds.height(), kAlpha_8_GrPixelConfig, nullptr)); |
if (!renderTargetContext) { |
@@ -115,7 +117,7 @@ sk_sp<GrTexture> SkAlphaThresholdFilterImpl::createMaskTexture(GrContext* contex |
iter.next(); |
} |
- return renderTargetContext->asTexture(); |
+ return renderTargetContext->asDeferredTexture(); |
} |
#endif |
@@ -147,7 +149,7 @@ sk_sp<SkSpecialImage> SkAlphaThresholdFilterImpl::onFilterImage(SkSpecialImage* |
if (source->isTextureBacked()) { |
GrContext* context = source->getContext(); |
- sk_sp<GrTexture> inputTexture(input->asTextureRef(context)); |
+ sk_sp<GrTextureProxy> inputTexture(input->asTextureProxy(context)); |
SkASSERT(inputTexture); |
offset->fX = bounds.left(); |
@@ -158,7 +160,7 @@ sk_sp<SkSpecialImage> SkAlphaThresholdFilterImpl::onFilterImage(SkSpecialImage* |
SkMatrix matrix(ctx.ctm()); |
matrix.postTranslate(SkIntToScalar(-bounds.left()), SkIntToScalar(-bounds.top())); |
- sk_sp<GrTexture> maskTexture(this->createMaskTexture(context, matrix, bounds)); |
+ sk_sp<GrTextureProxy> maskTexture(this->createMaskTexture(context, matrix, bounds)); |
if (!maskTexture) { |
return nullptr; |
} |