| Index: src/gpu/effects/GrBicubicEffect.h
|
| diff --git a/src/gpu/effects/GrBicubicEffect.h b/src/gpu/effects/GrBicubicEffect.h
|
| index 208719217bc284669c1b78df165ca5310dbd7157..3c84f979191d396fb0430deac717d9c0c674675d 100644
|
| --- a/src/gpu/effects/GrBicubicEffect.h
|
| +++ b/src/gpu/effects/GrBicubicEffect.h
|
| @@ -32,43 +32,46 @@ public:
|
| /**
|
| * Create a simple filter effect with custom bicubic coefficients and optional domain.
|
| */
|
| - static const GrFragmentProcessor* Create(GrTexture* tex, const SkScalar coefficients[16],
|
| - const SkRect* domain = nullptr) {
|
| + static sk_sp<GrFragmentProcessor> Make(GrTexture* tex, const SkScalar coefficients[16],
|
| + const SkRect* domain = nullptr) {
|
| if (nullptr == domain) {
|
| static const SkShader::TileMode kTileModes[] = { SkShader::kClamp_TileMode,
|
| SkShader::kClamp_TileMode };
|
| - return Create(tex, coefficients, GrCoordTransform::MakeDivByTextureWHMatrix(tex),
|
| - kTileModes);
|
| + return Make(tex, coefficients, GrCoordTransform::MakeDivByTextureWHMatrix(tex),
|
| + kTileModes);
|
| } else {
|
| - return new GrBicubicEffect(tex, coefficients,
|
| - GrCoordTransform::MakeDivByTextureWHMatrix(tex), *domain);
|
| + return sk_sp<GrFragmentProcessor>(
|
| + new GrBicubicEffect(tex, coefficients,
|
| + GrCoordTransform::MakeDivByTextureWHMatrix(tex), *domain));
|
| }
|
| }
|
|
|
| /**
|
| * Create a Mitchell filter effect with specified texture matrix and x/y tile modes.
|
| */
|
| - static const GrFragmentProcessor* Create(GrTexture* tex, const SkMatrix& matrix,
|
| - const SkShader::TileMode tileModes[2]) {
|
| - return Create(tex, gMitchellCoefficients, matrix, tileModes);
|
| + static sk_sp<GrFragmentProcessor> Make(GrTexture* tex, const SkMatrix& matrix,
|
| + const SkShader::TileMode tileModes[2]) {
|
| + return Make(tex, gMitchellCoefficients, matrix, tileModes);
|
| }
|
|
|
| /**
|
| * Create a filter effect with custom bicubic coefficients, the texture matrix, and the x/y
|
| * tilemodes.
|
| */
|
| - static const GrFragmentProcessor* Create(GrTexture* tex, const SkScalar coefficients[16],
|
| - const SkMatrix& matrix,
|
| - const SkShader::TileMode tileModes[2]) {
|
| - return new GrBicubicEffect(tex, coefficients, matrix, tileModes);
|
| + static sk_sp<GrFragmentProcessor> Make(GrTexture* tex, const SkScalar coefficients[16],
|
| + const SkMatrix& matrix,
|
| + const SkShader::TileMode tileModes[2]) {
|
| + return sk_sp<GrFragmentProcessor>(new GrBicubicEffect(tex, coefficients, matrix,
|
| + tileModes));
|
| }
|
|
|
| /**
|
| * Create a Mitchell filter effect with a texture matrix and a domain.
|
| */
|
| - static const GrFragmentProcessor* Create(GrTexture* tex, const SkMatrix& matrix,
|
| - const SkRect& domain) {
|
| - return new GrBicubicEffect(tex, gMitchellCoefficients, matrix, domain);
|
| + static sk_sp<GrFragmentProcessor> Make(GrTexture* tex, const SkMatrix& matrix,
|
| + const SkRect& domain) {
|
| + return sk_sp<GrFragmentProcessor>(new GrBicubicEffect(tex, gMitchellCoefficients, matrix,
|
| + domain));
|
| }
|
|
|
| /**
|
|
|