diff options
author | Brian Salomon <bsalomon@google.com> | 2017-08-11 09:40:37 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-08-11 14:13:26 +0000 |
commit | aff329b8e9b239bca1d93b13a914fbef45ccf7fe (patch) | |
tree | 06ba42a557c6695f145bcf4956c981fc87af55ff /src/gpu/effects/GrSimpleTextureEffect.cpp | |
parent | e2cbd0451832ec71d1b498e0f64d02b7d096b2b7 (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/GrSimpleTextureEffect.cpp')
-rw-r--r-- | src/gpu/effects/GrSimpleTextureEffect.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gpu/effects/GrSimpleTextureEffect.cpp b/src/gpu/effects/GrSimpleTextureEffect.cpp index bd2b80529a..9a0017c8d1 100644 --- a/src/gpu/effects/GrSimpleTextureEffect.cpp +++ b/src/gpu/effects/GrSimpleTextureEffect.cpp @@ -80,12 +80,13 @@ GrSimpleTextureEffect::GrSimpleTextureEffect(const GrSimpleTextureEffect& src) this->addTextureSampler(&fImage); this->addCoordTransform(&fImageCoordTransform); } -sk_sp<GrFragmentProcessor> GrSimpleTextureEffect::clone() const { - return sk_sp<GrFragmentProcessor>(new GrSimpleTextureEffect(*this)); +std::unique_ptr<GrFragmentProcessor> GrSimpleTextureEffect::clone() const { + return std::unique_ptr<GrFragmentProcessor>(new GrSimpleTextureEffect(*this)); } GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrSimpleTextureEffect); #if GR_TEST_UTILS -sk_sp<GrFragmentProcessor> GrSimpleTextureEffect::TestCreate(GrProcessorTestData* testData) { +std::unique_ptr<GrFragmentProcessor> GrSimpleTextureEffect::TestCreate( + GrProcessorTestData* testData) { int texIdx = testData->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx : GrProcessorUnitTest::kAlphaTextureIdx; static const SkShader::TileMode kTileModes[] = { |