diff options
Diffstat (limited to 'webkit/gpu/webgraphicscontext3d_in_process_impl.cc')
-rw-r--r-- | webkit/gpu/webgraphicscontext3d_in_process_impl.cc | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/webkit/gpu/webgraphicscontext3d_in_process_impl.cc b/webkit/gpu/webgraphicscontext3d_in_process_impl.cc index f2fc2e9..f79f4a6 100644 --- a/webkit/gpu/webgraphicscontext3d_in_process_impl.cc +++ b/webkit/gpu/webgraphicscontext3d_in_process_impl.cc @@ -10,6 +10,7 @@ #include <string> #include "base/logging.h" +#include "base/memory/scoped_ptr.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" @@ -134,8 +135,7 @@ bool WebGraphicsContext3DInProcessImpl::initialize( // and from there to the window, and WebViewImpl::paint already // correctly handles the case where the compositor is active but // the output needs to go to a WebCanvas. - gl_surface_.reset(gfx::GLSurface::CreateOffscreenGLSurface( - gfx::Size(1, 1))); + gl_surface_ = gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size(1, 1)); if (!gl_surface_.get()) { if (!is_gles2_) return false; @@ -149,14 +149,13 @@ bool WebGraphicsContext3DInProcessImpl::initialize( // necessary. webView->mainFrame()->collectGarbage(); - gl_surface_.reset( - gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size(1, 1))); + gl_surface_ = gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size(1, 1)); if (!gl_surface_.get()) return false; } - gl_context_.reset(gfx::GLContext::CreateGLContext(share_context, - gl_surface_.get())); + gl_context_ = gfx::GLContext::CreateGLContext(share_context, + gl_surface_.get()); if (!gl_context_.get()) { if (!is_gles2_) return false; @@ -170,8 +169,8 @@ bool WebGraphicsContext3DInProcessImpl::initialize( // necessary. webView->mainFrame()->collectGarbage(); - gl_context_.reset(gfx::GLContext::CreateGLContext(share_context, - gl_surface_.get())); + gl_context_ = gfx::GLContext::CreateGLContext(share_context, + gl_surface_.get()); if (!gl_context_.get()) return false; } @@ -190,7 +189,7 @@ bool WebGraphicsContext3DInProcessImpl::initialize( attributes_.antialias = false; if (!gl_context_->MakeCurrent(gl_surface_.get())) { - gl_context_.reset(); + gl_context_ = NULL; return false; } |