aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Ben Wagner <bungeman@google.com>2018-07-12 13:30:47 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-07-12 20:59:20 +0000
commit9ec70c6bd3dfe6338fbbae9c0447a5cbae770a75 (patch)
treefe9dcd75fcc80ce6c3d52a6d18cf8639b8aed485 /include
parentc434ade20eba4a62c450b7ce33a89966fac9df62 (diff)
Remove SkSafeSetNull.
Update all users to sk_sp. Change-Id: I6453b9456b9a8f9e2b756381797f1382ef9e6561 Reviewed-on: https://skia-review.googlesource.com/141052 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Herb Derby <herb@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/core/SkRefCnt.h7
-rw-r--r--include/gpu/GrRenderTarget.h3
2 files changed, 2 insertions, 8 deletions
diff --git a/include/core/SkRefCnt.h b/include/core/SkRefCnt.h
index d919c8114c..adebd9b8a6 100644
--- a/include/core/SkRefCnt.h
+++ b/include/core/SkRefCnt.h
@@ -199,13 +199,6 @@ template <typename T> static inline void SkSafeUnref(T* obj) {
}
}
-template<typename T> static inline void SkSafeSetNull(T*& obj) {
- if (obj) {
- obj->unref();
- obj = nullptr;
- }
-}
-
///////////////////////////////////////////////////////////////////////////////
// This is a variant of SkRefCnt that's Not Virtual, so weighs 4 bytes instead of 8 or 16.
diff --git a/include/gpu/GrRenderTarget.h b/include/gpu/GrRenderTarget.h
index 784e15f8b0..32c6225d29 100644
--- a/include/gpu/GrRenderTarget.h
+++ b/include/gpu/GrRenderTarget.h
@@ -110,6 +110,7 @@ public:
protected:
GrRenderTarget(GrGpu*, const GrSurfaceDesc&, GrStencilAttachment* = nullptr);
+ ~GrRenderTarget() override;
// override of GrResource
void onAbandon() override;
@@ -125,7 +126,7 @@ private:
friend class GrRenderTargetPriv;
int fSampleCnt;
- GrStencilAttachment* fStencilAttachment;
+ sk_sp<GrStencilAttachment> fStencilAttachment;
SkIRect fResolveRect;