diff options
Diffstat (limited to 'src/utils/win/SkWGL_win.cpp')
-rw-r--r-- | src/utils/win/SkWGL_win.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
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); } |