aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
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;