aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects/GrBicubicEffect.h
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-08-11 09:40:37 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-08-11 14:13:26 +0000
commitaff329b8e9b239bca1d93b13a914fbef45ccf7fe (patch)
tree06ba42a557c6695f145bcf4956c981fc87af55ff /src/gpu/effects/GrBicubicEffect.h
parente2cbd0451832ec71d1b498e0f64d02b7d096b2b7 (diff)
Make GrFragmentProcessor be non-refcounted and use std::unique_ptr.
Change-Id: I985e54a071338e99292a5aa2f42c92bc115b4008 Reviewed-on: https://skia-review.googlesource.com/32760 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/gpu/effects/GrBicubicEffect.h')
-rw-r--r--src/gpu/effects/GrBicubicEffect.h30
1 files changed, 14 insertions, 16 deletions
diff --git a/src/gpu/effects/GrBicubicEffect.h b/src/gpu/effects/GrBicubicEffect.h
index 65e2c3dbba..7812f3fcb0 100644
--- a/src/gpu/effects/GrBicubicEffect.h
+++ b/src/gpu/effects/GrBicubicEffect.h
@@ -22,8 +22,8 @@ public:
const char* name() const override { return "Bicubic"; }
- sk_sp<GrFragmentProcessor> clone() const override {
- return sk_sp<GrFragmentProcessor>(new GrBicubicEffect(*this));
+ std::unique_ptr<GrFragmentProcessor> clone() const override {
+ return std::unique_ptr<GrFragmentProcessor>(new GrBicubicEffect(*this));
}
const GrTextureDomain& domain() const { return fDomain; }
@@ -33,25 +33,23 @@ public:
/**
* Create a Mitchell filter effect with specified texture matrix and x/y tile modes.
*/
- static sk_sp<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
- sk_sp<GrColorSpaceXform> colorSpaceXform,
- const SkMatrix& matrix,
- const SkShader::TileMode tileModes[2]) {
- return sk_sp<GrFragmentProcessor>(new GrBicubicEffect(std::move(proxy),
- std::move(colorSpaceXform),
- matrix, tileModes));
+ static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
+ sk_sp<GrColorSpaceXform> colorSpaceXform,
+ const SkMatrix& matrix,
+ const SkShader::TileMode tileModes[2]) {
+ return std::unique_ptr<GrFragmentProcessor>(new GrBicubicEffect(
+ std::move(proxy), std::move(colorSpaceXform), matrix, tileModes));
}
/**
* Create a Mitchell filter effect with a texture matrix and a domain.
*/
- static sk_sp<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
- sk_sp<GrColorSpaceXform> colorSpaceXform,
- const SkMatrix& matrix,
- const SkRect& domain) {
- return sk_sp<GrFragmentProcessor>(new GrBicubicEffect(std::move(proxy),
- std::move(colorSpaceXform),
- matrix, domain));
+ static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
+ sk_sp<GrColorSpaceXform> colorSpaceXform,
+ const SkMatrix& matrix,
+ const SkRect& domain) {
+ return std::unique_ptr<GrFragmentProcessor>(
+ new GrBicubicEffect(std::move(proxy), std::move(colorSpaceXform), matrix, domain));
}
/**