aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/utils
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 /src/utils
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 'src/utils')
-rw-r--r--src/utils/win/SkWGL.h4
-rw-r--r--src/utils/win/SkWGL_win.cpp7
2 files changed, 6 insertions, 5 deletions
diff --git a/src/utils/win/SkWGL.h b/src/utils/win/SkWGL.h
index cd19f2eeba..6aafdcdbc0 100644
--- a/src/utils/win/SkWGL.h
+++ b/src/utils/win/SkWGL.h
@@ -145,8 +145,8 @@ HGLRC SkCreateWGLContext(HDC dc, int msaaSampleCount, bool deepColor, SkWGLConte
*/
class SkWGLPbufferContext : public SkRefCnt {
public:
- static SkWGLPbufferContext* Create(HDC parentDC, SkWGLContextRequest contextType,
- HGLRC shareContext);
+ static sk_sp<SkWGLPbufferContext> Create(HDC parentDC, SkWGLContextRequest contextType,
+ HGLRC shareContext);
virtual ~SkWGLPbufferContext();
diff --git a/src/utils/win/SkWGL_win.cpp b/src/utils/win/SkWGL_win.cpp
index 441d7a4ebb..90b683e3c0 100644
--- a/src/utils/win/SkWGL_win.cpp
+++ b/src/utils/win/SkWGL_win.cpp
@@ -443,8 +443,9 @@ HGLRC SkCreateWGLContext(HDC dc, int msaaSampleCount, bool deepColor,
return create_gl_context(dc, extensions, contextType, shareContext);
}
-SkWGLPbufferContext* SkWGLPbufferContext::Create(HDC parentDC, SkWGLContextRequest contextType,
- HGLRC shareContext) {
+sk_sp<SkWGLPbufferContext> SkWGLPbufferContext::Create(HDC parentDC,
+ SkWGLContextRequest contextType,
+ HGLRC shareContext) {
SkWGLExtensions extensions;
if (!extensions.hasExtension(parentDC, "WGL_ARB_pixel_format") ||
!extensions.hasExtension(parentDC, "WGL_ARB_pbuffer")) {
@@ -485,7 +486,7 @@ SkWGLPbufferContext* SkWGLPbufferContext::Create(HDC parentDC, SkWGLContextReque
if (dc) {
HGLRC glrc = create_gl_context(dc, extensions, contextType, shareContext);
if (glrc) {
- return new SkWGLPbufferContext(pbuf, dc, glrc);
+ return sk_sp<SkWGLPbufferContext>(new SkWGLPbufferContext(pbuf, dc, glrc));
}
extensions.releasePbufferDC(pbuf, dc);
}