diff options
author | bungeman <bungeman@google.com> | 2016-06-09 08:01:03 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-09 08:01:03 -0700 |
commit | 06ca8ec87cf6fab57cadd043a5ac18c4154a4129 (patch) | |
tree | 95e7eaaaf3f42ce550332277c431e3ec119446f4 /src/gpu/effects/GrSimpleTextureEffect.h | |
parent | 897a8e38879643d81a64d2bb6bed4e22af982aa4 (diff) |
sk_sp for Ganesh.
Convert use of GrFragmentProcessor, GrGeometryProcessor, and
GrXPFactory to sk_sp. This clarifies ownership and should
reduce reference count churn by moving ownership.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2041113004
Review-Url: https://codereview.chromium.org/2041113004
Diffstat (limited to 'src/gpu/effects/GrSimpleTextureEffect.h')
-rw-r--r-- | src/gpu/effects/GrSimpleTextureEffect.h | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/src/gpu/effects/GrSimpleTextureEffect.h b/src/gpu/effects/GrSimpleTextureEffect.h index 18a8a78fc4..08eb8c17e1 100644 --- a/src/gpu/effects/GrSimpleTextureEffect.h +++ b/src/gpu/effects/GrSimpleTextureEffect.h @@ -21,25 +21,27 @@ class GrInvariantOutput; class GrSimpleTextureEffect : public GrSingleTextureEffect { public: /* unfiltered, clamp mode */ - static const GrFragmentProcessor* Create(GrTexture* tex, - const SkMatrix& matrix, - GrCoordSet coordSet = kLocal_GrCoordSet) { - return new GrSimpleTextureEffect(tex, matrix, GrTextureParams::kNone_FilterMode, coordSet); + static sk_sp<GrFragmentProcessor> Make(GrTexture* tex, + const SkMatrix& matrix, + GrCoordSet coordSet = kLocal_GrCoordSet) { + return sk_sp<GrFragmentProcessor>( + new GrSimpleTextureEffect(tex, matrix, GrTextureParams::kNone_FilterMode, coordSet)); } /* clamp mode */ - static GrFragmentProcessor* Create(GrTexture* tex, - const SkMatrix& matrix, - GrTextureParams::FilterMode filterMode, - GrCoordSet coordSet = kLocal_GrCoordSet) { - return new GrSimpleTextureEffect(tex, matrix, filterMode, coordSet); + static sk_sp<GrFragmentProcessor> Make(GrTexture* tex, + const SkMatrix& matrix, + GrTextureParams::FilterMode filterMode, + GrCoordSet coordSet = kLocal_GrCoordSet) { + return sk_sp<GrFragmentProcessor>( + new GrSimpleTextureEffect(tex, matrix, filterMode, coordSet)); } - static GrFragmentProcessor* Create(GrTexture* tex, - const SkMatrix& matrix, - const GrTextureParams& p, - GrCoordSet coordSet = kLocal_GrCoordSet) { - return new GrSimpleTextureEffect(tex, matrix, p, coordSet); + static sk_sp<GrFragmentProcessor> Make(GrTexture* tex, + const SkMatrix& matrix, + const GrTextureParams& p, + GrCoordSet coordSet = kLocal_GrCoordSet) { + return sk_sp<GrFragmentProcessor>(new GrSimpleTextureEffect(tex, matrix, p, coordSet)); } virtual ~GrSimpleTextureEffect() {} |