Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Unified Diff: gpu/command_buffer/service/in_process_command_buffer.cc

Issue 500243002: Remove implicit conversions from scoped_refptr to T* in gpu/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert silliness Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/service/gpu_tracer.cc ('k') | gpu/command_buffer/service/mailbox_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « gpu/command_buffer/service/gpu_tracer.cc ('k') | gpu/command_buffer/service/mailbox_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698