diff options
-rw-r--r-- | src/core/SkBitmapProcShader.cpp | 2 | ||||
-rw-r--r-- | src/gpu/effects/GrBicubicEffect.h | 18 | ||||
-rw-r--r-- | src/image/SkImageShader.cpp | 2 |
3 files changed, 11 insertions, 11 deletions
diff --git a/src/core/SkBitmapProcShader.cpp b/src/core/SkBitmapProcShader.cpp index 70f692acf4..dd97380bbd 100644 --- a/src/core/SkBitmapProcShader.cpp +++ b/src/core/SkBitmapProcShader.cpp @@ -400,7 +400,7 @@ const GrFragmentProcessor* SkBitmapProcShader::asFragmentProcessor(GrContext* co return nullptr; } - SkAutoTUnref<GrFragmentProcessor> inner; + SkAutoTUnref<const GrFragmentProcessor> inner; if (doBicubic) { inner.reset(GrBicubicEffect::Create(texture, matrix, tm)); } else { diff --git a/src/gpu/effects/GrBicubicEffect.h b/src/gpu/effects/GrBicubicEffect.h index 9167b9cc6f..9f9e20dbd1 100644 --- a/src/gpu/effects/GrBicubicEffect.h +++ b/src/gpu/effects/GrBicubicEffect.h @@ -32,8 +32,8 @@ public: /** * Create a simple filter effect with custom bicubic coefficients and optional domain. */ - static GrFragmentProcessor* Create(GrTexture* tex, const SkScalar coefficients[16], - const SkRect* domain = nullptr) { + static const GrFragmentProcessor* Create(GrTexture* tex, const SkScalar coefficients[16], + const SkRect* domain = nullptr) { if (nullptr == domain) { static const SkShader::TileMode kTileModes[] = { SkShader::kClamp_TileMode, SkShader::kClamp_TileMode }; @@ -48,8 +48,8 @@ public: /** * Create a Mitchell filter effect with specified texture matrix and x/y tile modes. */ - static GrFragmentProcessor* Create(GrTexture* tex, const SkMatrix& matrix, - SkShader::TileMode tileModes[2]) { + static const GrFragmentProcessor* Create(GrTexture* tex, const SkMatrix& matrix, + SkShader::TileMode tileModes[2]) { return Create(tex, gMitchellCoefficients, matrix, tileModes); } @@ -57,17 +57,17 @@ public: * Create a filter effect with custom bicubic coefficients, the texture matrix, and the x/y * tilemodes. */ - static GrFragmentProcessor* Create(GrTexture* tex, const SkScalar coefficients[16], - const SkMatrix& matrix, - const SkShader::TileMode tileModes[2]) { + 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); } /** * Create a Mitchell filter effect with a texture matrix and a domain. */ - static GrFragmentProcessor* Create(GrTexture* tex, const SkMatrix& matrix, - const SkRect& domain) { + static const GrFragmentProcessor* Create(GrTexture* tex, const SkMatrix& matrix, + const SkRect& domain) { return new GrBicubicEffect(tex, gMitchellCoefficients, matrix, domain); } diff --git a/src/image/SkImageShader.cpp b/src/image/SkImageShader.cpp index 56af17994c..22189fa61a 100644 --- a/src/image/SkImageShader.cpp +++ b/src/image/SkImageShader.cpp @@ -118,7 +118,7 @@ const GrFragmentProcessor* SkImageShader::asFragmentProcessor(GrContext* context return nullptr; } - SkAutoTUnref<GrFragmentProcessor> inner; + SkAutoTUnref<const GrFragmentProcessor> inner; if (doBicubic) { inner.reset(GrBicubicEffect::Create(texture, matrix, tm)); } else { |