diff options
Diffstat (limited to 'content/gpu')
-rw-r--r-- | content/gpu/gpu_child_thread.cc | 14 | ||||
-rw-r--r-- | content/gpu/gpu_main.cc | 12 |
2 files changed, 12 insertions, 14 deletions
diff --git a/content/gpu/gpu_child_thread.cc b/content/gpu/gpu_child_thread.cc index c523550..451e31c 100644 --- a/content/gpu/gpu_child_thread.cc +++ b/content/gpu/gpu_child_thread.cc @@ -144,11 +144,11 @@ void GpuChildThread::OnInitialize() { // Defer creation of the render thread. This is to prevent it from handling // IPC messages before the sandbox has been enabled and all other necessary // initialization has succeeded. - gpu_channel_manager_.reset(new GpuChannelManager( - this, - watchdog_thread_, - ChildProcess::current()->io_message_loop_proxy(), - ChildProcess::current()->GetShutDownEvent())); + gpu_channel_manager_.reset( + new GpuChannelManager(this, + watchdog_thread_.get(), + ChildProcess::current()->io_message_loop_proxy(), + ChildProcess::current()->GetShutDownEvent())); // Ensure the browser process receives the GPU info before a reply to any // subsequent IPC it might send. @@ -157,7 +157,7 @@ void GpuChildThread::OnInitialize() { } void GpuChildThread::StopWatchdog() { - if (watchdog_thread_) { + if (watchdog_thread_.get()) { watchdog_thread_->Stop(); } } @@ -224,7 +224,7 @@ void GpuChildThread::OnHang() { void GpuChildThread::OnDisableWatchdog() { VLOG(1) << "GPU: Disabling watchdog thread"; - if (watchdog_thread_) { + if (watchdog_thread_.get()) { // Disarm the watchdog before shutting down the message loop. This prevents // the future posting of tasks to the message loop. if (watchdog_thread_->message_loop()) diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc index d8a713b8..2bfd51f 100644 --- a/content/gpu/gpu_main.cc +++ b/content/gpu/gpu_main.cc @@ -276,24 +276,22 @@ namespace { void CreateDummyGlContext() { scoped_refptr<gfx::GLSurface> surface( gfx::GLSurface::CreateOffscreenGLSurface(false, gfx::Size(1, 1))); - if (!surface) { + if (!surface.get()) { VLOG(1) << "gfx::GLSurface::CreateOffscreenGLSurface failed"; return; } // On Linux, this is needed to make sure /dev/nvidiactl has // been opened and its descriptor cached. - scoped_refptr<gfx::GLContext> context( - gfx::GLContext::CreateGLContext(NULL, - surface, - gfx::PreferDiscreteGpu)); - if (!context) { + scoped_refptr<gfx::GLContext> context(gfx::GLContext::CreateGLContext( + NULL, surface.get(), gfx::PreferDiscreteGpu)); + if (!context.get()) { VLOG(1) << "gfx::GLContext::CreateGLContext failed"; return; } // Similarly, this is needed for /dev/nvidia0. - if (context->MakeCurrent(surface)) { + if (context->MakeCurrent(surface.get())) { context->ReleaseCurrent(surface.get()); } else { VLOG(1) << "gfx::GLContext::MakeCurrent failed"; |