Index: src/gpu/gl/GrGLRenderTarget.cpp |
diff --git a/src/gpu/gl/GrGLRenderTarget.cpp b/src/gpu/gl/GrGLRenderTarget.cpp |
index 69d7b9ca580cf398da87dcb29a79a5b370db842a..a6fc1862b32bd0a036a80ffbbc1596b47b52e979 100644 |
--- a/src/gpu/gl/GrGLRenderTarget.cpp |
+++ b/src/gpu/gl/GrGLRenderTarget.cpp |
@@ -20,8 +20,7 @@ void GrGLRenderTarget::init(const Desc& desc, |
fTexFBOID = desc.fTexFBOID; |
fMSColorRenderbufferID = desc.fMSColorRenderbufferID; |
fViewport = viewport; |
- fTexIDObj = texID; |
- GrSafeRef(fTexIDObj); |
+ fTexIDObj.reset(SkSafeRef(texID)); |
} |
namespace { |
@@ -95,8 +94,7 @@ void GrGLRenderTarget::onRelease() { |
fRTFBOID = 0; |
fTexFBOID = 0; |
fMSColorRenderbufferID = 0; |
- GrSafeUnref(fTexIDObj); |
- fTexIDObj = NULL; |
+ fTexIDObj.reset(NULL); |
INHERITED::onRelease(); |
} |
@@ -104,9 +102,9 @@ void GrGLRenderTarget::onAbandon() { |
fRTFBOID = 0; |
fTexFBOID = 0; |
fMSColorRenderbufferID = 0; |
- if (NULL != fTexIDObj) { |
+ if (NULL != fTexIDObj.get()) { |
fTexIDObj->abandon(); |
- fTexIDObj = NULL; |
+ fTexIDObj.reset(NULL); |
} |
INHERITED::onAbandon(); |
} |