Index: gpu/command_buffer/service/in_process_command_buffer.cc |
diff --git a/gpu/command_buffer/service/in_process_command_buffer.cc b/gpu/command_buffer/service/in_process_command_buffer.cc |
index 6aa7cfbfc8b7e1475a7bc020049eda1a42268b2d..34b746a8c86baf47617f8b4de944fe55e6c00b4a 100644 |
--- a/gpu/command_buffer/service/in_process_command_buffer.cc |
+++ b/gpu/command_buffer/service/in_process_command_buffer.cc |
@@ -211,7 +211,7 @@ InProcessCommandBuffer::InProcessCommandBuffer( |
flush_event_(false, false), |
service_(service.get() ? service : GetDefaultService()), |
gpu_thread_weak_ptr_factory_(this) { |
- if (!service) { |
+ if (!service.get()) { |
base::AutoLock lock(default_thread_clients_lock_.Get()); |
default_thread_clients_.Get().insert(this); |
} |
@@ -270,7 +270,7 @@ bool InProcessCommandBuffer::Initialize( |
DCHECK(!share_group || service_ == share_group->service_); |
context_lost_callback_ = WrapCallback(context_lost_callback); |
- if (surface) { |
+ if (surface.get()) { |
// GPU thread must be the same as client thread due to GLSurface not being |
// thread safe. |
sequence_checker_.reset(new base::SequenceChecker); |
@@ -355,7 +355,7 @@ bool InProcessCommandBuffer::InitializeOnGpuThread( |
decoder_->set_engine(gpu_scheduler_.get()); |
- if (!surface_) { |
+ if (!surface_.get()) { |
if (params.is_offscreen) |
surface_ = gfx::GLSurface::CreateOffscreenGLSurface(params.size); |
else |
@@ -440,7 +440,7 @@ bool InProcessCommandBuffer::DestroyOnGpuThread() { |
gpu_thread_weak_ptr_factory_.InvalidateWeakPtrs(); |
command_buffer_.reset(); |
// Clean up GL resources if possible. |
- bool have_context = context_ && context_->MakeCurrent(surface_); |
+ bool have_context = context_.get() && context_->MakeCurrent(surface_.get()); |
if (decoder_) { |
decoder_->Destroy(have_context); |
decoder_.reset(); |
@@ -649,7 +649,7 @@ void InProcessCommandBuffer::RegisterGpuMemoryBufferOnGpuThread( |
scoped_refptr<gfx::GLImage> image = |
g_gpu_memory_buffer_factory->CreateImageForGpuMemoryBuffer( |
handle, gfx::Size(width, height), internalformat); |
- if (!image) |
+ if (!image.get()) |
return; |
// For Android specific workaround. |