| Index: src/gpu/effects/GrTextureDomain.cpp
|
| diff --git a/src/gpu/effects/GrTextureDomain.cpp b/src/gpu/effects/GrTextureDomain.cpp
|
| index cf6ebe54beddd5040f5a1bf76c83b46a918daf82..3fbf0008a40c5f870ad70f840946ce283ef54b68 100644
|
| --- a/src/gpu/effects/GrTextureDomain.cpp
|
| +++ b/src/gpu/effects/GrTextureDomain.cpp
|
| @@ -218,18 +218,19 @@ void GrGLTextureDomainEffect::GenKey(const GrProcessor& processor, const GrGLSLC
|
|
|
| ///////////////////////////////////////////////////////////////////////////////
|
|
|
| -const GrFragmentProcessor* GrTextureDomainEffect::Create(GrTexture* texture,
|
| - const SkMatrix& matrix,
|
| - const SkRect& domain,
|
| - GrTextureDomain::Mode mode,
|
| - GrTextureParams::FilterMode filterMode,
|
| - GrCoordSet coordSet) {
|
| +sk_sp<GrFragmentProcessor> GrTextureDomainEffect::Make(GrTexture* texture,
|
| + const SkMatrix& matrix,
|
| + const SkRect& domain,
|
| + GrTextureDomain::Mode mode,
|
| + GrTextureParams::FilterMode filterMode,
|
| + GrCoordSet coordSet) {
|
| static const SkRect kFullRect = {0, 0, SK_Scalar1, SK_Scalar1};
|
| if (GrTextureDomain::kIgnore_Mode == mode ||
|
| (GrTextureDomain::kClamp_Mode == mode && domain.contains(kFullRect))) {
|
| - return GrSimpleTextureEffect::Create(texture, matrix, filterMode);
|
| + return GrSimpleTextureEffect::Make(texture, matrix, filterMode);
|
| } else {
|
| - return new GrTextureDomainEffect(texture, matrix, domain, mode, filterMode, coordSet);
|
| + return sk_sp<GrFragmentProcessor>(
|
| + new GrTextureDomainEffect(texture, matrix, domain, mode, filterMode, coordSet));
|
| }
|
| }
|
|
|
| @@ -278,7 +279,7 @@ void GrTextureDomainEffect::onComputeInvariantOutput(GrInvariantOutput* inout) c
|
|
|
| GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrTextureDomainEffect);
|
|
|
| -const GrFragmentProcessor* GrTextureDomainEffect::TestCreate(GrProcessorTestData* d) {
|
| +sk_sp<GrFragmentProcessor> GrTextureDomainEffect::TestCreate(GrProcessorTestData* d) {
|
| int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx :
|
| GrProcessorUnitTest::kAlphaTextureIdx;
|
| SkRect domain;
|
| @@ -291,7 +292,7 @@ const GrFragmentProcessor* GrTextureDomainEffect::TestCreate(GrProcessorTestData
|
| const SkMatrix& matrix = GrTest::TestMatrix(d->fRandom);
|
| bool bilerp = mode != GrTextureDomain::kRepeat_Mode ? d->fRandom->nextBool() : false;
|
| GrCoordSet coords = d->fRandom->nextBool() ? kLocal_GrCoordSet : kDevice_GrCoordSet;
|
| - return GrTextureDomainEffect::Create(
|
| + return GrTextureDomainEffect::Make(
|
| d->fTextures[texIdx],
|
| matrix,
|
| domain,
|
|
|