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/GrAppliedClip.h | |
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/GrAppliedClip.h')
-rw-r--r-- | src/gpu/GrAppliedClip.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gpu/GrAppliedClip.h b/src/gpu/GrAppliedClip.h index 7ef3346ed3..bcf6eb9ce8 100644 --- a/src/gpu/GrAppliedClip.h +++ b/src/gpu/GrAppliedClip.h @@ -27,7 +27,7 @@ public: const GrScissorState& scissorState() const { return fScissorState; } const GrWindowRectsState& windowRectsState() const { return fWindowRectsState; } GrFragmentProcessor* clipCoverageFragmentProcessor() const { return fClipCoverageFP.get(); } - sk_sp<GrFragmentProcessor> detachClipCoverageFragmentProcessor() { + std::unique_ptr<GrFragmentProcessor> detachClipCoverageFragmentProcessor() { return std::move(fClipCoverageFP); } bool hasStencilClip() const { return SkClipStack::kInvalidGenID != fClipStackID; } @@ -51,9 +51,9 @@ public: fWindowRectsState.set(windows, mode); } - void addCoverageFP(sk_sp<GrFragmentProcessor> fp) { + void addCoverageFP(std::unique_ptr<GrFragmentProcessor> fp) { SkASSERT(!fClipCoverageFP); - fClipCoverageFP = fp; + fClipCoverageFP = std::move(fp); } void addStencilClip(uint32_t clipStackID) { @@ -85,7 +85,7 @@ public: private: GrScissorState fScissorState; GrWindowRectsState fWindowRectsState; - sk_sp<GrFragmentProcessor> fClipCoverageFP; + std::unique_ptr<GrFragmentProcessor> fClipCoverageFP; uint32_t fClipStackID = SkClipStack::kInvalidGenID; }; |