Index: src/effects/SkDisplacementMapEffect.cpp |
diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp |
index d73b440a7519f3d463d0b705e86918d1b72287e5..71fd9c00c43be7415644e45d9b082b36cce19b41 100644 |
--- a/src/effects/SkDisplacementMapEffect.cpp |
+++ b/src/effects/SkDisplacementMapEffect.cpp |
@@ -18,6 +18,7 @@ |
#include "GrRenderTargetContext.h" |
#include "GrCoordTransform.h" |
#include "GrInvariantOutput.h" |
+#include "GrTextureProxy.h" |
#include "SkGr.h" |
#include "SkGrPriv.h" |
#include "effects/GrTextureDomain.h" |
@@ -349,7 +350,7 @@ sk_sp<SkSpecialImage> SkDisplacementMapEffect::onFilterImage(SkSpecialImage* sou |
SkColorSpace* colorSpace = ctx.outputProperties().colorSpace(); |
sk_sp<GrRenderTargetContext> renderTargetContext( |
- context->makeRenderTargetContext(SkBackingFit::kApprox, bounds.width(), bounds.height(), |
+ context->makeDeferredRenderTargetContext(SkBackingFit::kApprox, bounds.width(), bounds.height(), |
GrRenderableConfigForColorSpace(colorSpace), |
sk_ref_sp(colorSpace))); |
if (!renderTargetContext) { |
@@ -361,10 +362,10 @@ sk_sp<SkSpecialImage> SkDisplacementMapEffect::onFilterImage(SkSpecialImage* sou |
offset->fX = bounds.left(); |
offset->fY = bounds.top(); |
- return SkSpecialImage::MakeFromGpu(SkIRect::MakeWH(bounds.width(), bounds.height()), |
- kNeedNewImageUniqueID_SpecialImage, |
- renderTargetContext->asTexture(), |
- sk_ref_sp(renderTargetContext->getColorSpace())); |
+ return SkSpecialImage::MakeDeferredFromGpu(SkIRect::MakeWH(bounds.width(), bounds.height()), |
+ kNeedNewImageUniqueID_SpecialImage, |
+ renderTargetContext->asDeferredTexture(), |
+ sk_ref_sp(renderTargetContext->getColorSpace())); |
} |
#endif |
@@ -483,7 +484,8 @@ GrDisplacementMapEffect::GrDisplacementMapEffect( |
: fDisplacementTransform(offsetMatrix, displacement, GrTextureParams::kNone_FilterMode) |
, fDisplacementAccess(displacement) |
, fColorTransform(color, GrTextureParams::kNone_FilterMode) |
- , fDomain(GrTextureDomain::MakeTexelDomain(color, SkIRect::MakeSize(colorDimensions)), |
+ , fDomain(GrTextureDomain::MakeTexelDomain(color->width(), color->height(), |
+ SkIRect::MakeSize(colorDimensions)), |
GrTextureDomain::kDecal_Mode) |
, fColorAccess(color) |
, fXChannelSelector(xChannelSelector) |