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..c101e9bce185c79112c34e6bfa45ce810644a1d3 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); |
} |
@@ -267,10 +267,10 @@ bool InProcessCommandBuffer::Initialize( |
gfx::GpuPreference gpu_preference, |
const base::Closure& context_lost_callback, |
InProcessCommandBuffer* share_group) { |
- DCHECK(!share_group || service_ == share_group->service_); |
+ DCHECK(!share_group || service_.get() == share_group->service_.get()); |
no sievers
2014/08/25 21:57:15
same here, what if only one was a raw pointer (oth
dcheng
2014/08/25 22:02:54
This is kind of silly. We should support compariso
no sievers
2014/08/25 22:10:58
scoped_ptr allows comparison between scoped_ptr<T>
|
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. |