diff options
author | dcheng <dcheng@chromium.org> | 2014-08-26 16:01:40 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-08-26 23:11:21 +0000 |
commit | 56ddc2f61c93ef5827872177c436b1f414ed1d70 (patch) | |
tree | 962139aef64904aaa3d0ee3fe1b8e7bbc27609f1 /content | |
parent | a7be519752f930df9510761bb578204ed79fc20c (diff) | |
download | chromium_src-56ddc2f61c93ef5827872177c436b1f414ed1d70.zip chromium_src-56ddc2f61c93ef5827872177c436b1f414ed1d70.tar.gz chromium_src-56ddc2f61c93ef5827872177c436b1f414ed1d70.tar.bz2 |
Remove implicit conversions from scoped_refptr to T* in content/*/gpu/
This patch was generated by running the rewrite_scoped_refptr clang tool
on a Linux build.
BUG=110610
Review URL: https://codereview.chromium.org/503253003
Cr-Commit-Position: refs/heads/master@{#292018}
Diffstat (limited to 'content')
-rw-r--r-- | content/browser/gpu/browser_gpu_channel_host_factory.cc | 18 | ||||
-rw-r--r-- | content/browser/gpu/gpu_ipc_browsertests.cc | 2 | ||||
-rw-r--r-- | content/browser/gpu/shader_disk_cache.cc | 2 | ||||
-rw-r--r-- | content/common/gpu/client/gl_helper.cc | 4 | ||||
-rw-r--r-- | content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc | 2 | ||||
-rw-r--r-- | content/common/gpu/gpu_command_buffer_stub.cc | 2 | ||||
-rw-r--r-- | content/common/gpu/media/gpu_video_decode_accelerator.cc | 2 | ||||
-rw-r--r-- | content/common/gpu/media/gpu_video_encode_accelerator.cc | 2 | ||||
-rw-r--r-- | content/gpu/gpu_main.cc | 2 |
9 files changed, 18 insertions, 18 deletions
diff --git a/content/browser/gpu/browser_gpu_channel_host_factory.cc b/content/browser/gpu/browser_gpu_channel_host_factory.cc index 156dd89..de4e791 100644 --- a/content/browser/gpu/browser_gpu_channel_host_factory.cc +++ b/content/browser/gpu/browser_gpu_channel_host_factory.cc @@ -216,7 +216,7 @@ BrowserGpuChannelHostFactory::BrowserGpuChannelHostFactory() BrowserGpuChannelHostFactory::~BrowserGpuChannelHostFactory() { DCHECK(IsMainThread()); - if (pending_request_) + if (pending_request_.get()) pending_request_->Cancel(); for (size_t n = 0; n < established_callbacks_.size(); n++) established_callbacks_[n].Run(); @@ -301,7 +301,7 @@ GpuChannelHost* BrowserGpuChannelHostFactory::EstablishGpuChannelSync( CauseForGpuLaunch cause_for_gpu_launch) { EstablishGpuChannel(cause_for_gpu_launch, base::Closure()); - if (pending_request_) + if (pending_request_.get()) pending_request_->Wait(); return gpu_channel_.get(); @@ -311,19 +311,19 @@ void BrowserGpuChannelHostFactory::EstablishGpuChannel( CauseForGpuLaunch cause_for_gpu_launch, const base::Closure& callback) { if (gpu_channel_.get() && gpu_channel_->IsLost()) { - DCHECK(!pending_request_); + DCHECK(!pending_request_.get()); // Recreate the channel if it has been lost. gpu_channel_ = NULL; } - if (!gpu_channel_ && !pending_request_) { + if (!gpu_channel_.get() && !pending_request_.get()) { // We should only get here if the context was lost. pending_request_ = EstablishRequest::Create( cause_for_gpu_launch, gpu_client_id_, gpu_host_id_); } if (!callback.is_null()) { - if (gpu_channel_) + if (gpu_channel_.get()) callback.Run(); else established_callbacks_.push_back(callback); @@ -331,17 +331,17 @@ void BrowserGpuChannelHostFactory::EstablishGpuChannel( } GpuChannelHost* BrowserGpuChannelHostFactory::GetGpuChannel() { - if (gpu_channel_ && !gpu_channel_->IsLost()) - return gpu_channel_; + if (gpu_channel_.get() && !gpu_channel_->IsLost()) + return gpu_channel_.get(); return NULL; } void BrowserGpuChannelHostFactory::GpuChannelEstablished() { DCHECK(IsMainThread()); - DCHECK(pending_request_); + DCHECK(pending_request_.get()); if (pending_request_->channel_handle().name.empty()) { - DCHECK(!gpu_channel_); + DCHECK(!gpu_channel_.get()); } else { GetContentClient()->SetGpuInfo(pending_request_->gpu_info()); gpu_channel_ = GpuChannelHost::Create(this, diff --git a/content/browser/gpu/gpu_ipc_browsertests.cc b/content/browser/gpu/gpu_ipc_browsertests.cc index cbe4539..477ff1d 100644 --- a/content/browser/gpu/gpu_ipc_browsertests.cc +++ b/content/browser/gpu/gpu_ipc_browsertests.cc @@ -161,7 +161,7 @@ IN_PROC_BROWSER_TEST_F(BrowserGpuChannelHostFactoryTest, kInitCause, base::Bind(&BrowserGpuChannelHostFactoryTest::Signal, &event)); EXPECT_TRUE(event); - EXPECT_EQ(gpu_channel, GetGpuChannel()); + EXPECT_EQ(gpu_channel.get(), GetGpuChannel()); } // Fails since UI Compositor establishes a GpuChannel. diff --git a/content/browser/gpu/shader_disk_cache.cc b/content/browser/gpu/shader_disk_cache.cc index c987cef..a7f240c 100644 --- a/content/browser/gpu/shader_disk_cache.cc +++ b/content/browser/gpu/shader_disk_cache.cc @@ -545,7 +545,7 @@ void ShaderDiskCache::Cache(const std::string& key, const std::string& shader) { new ShaderDiskCacheEntry(AsWeakPtr(), key, shader); shim->Cache(); - entry_map_[shim] = shim; + entry_map_[shim.get()] = shim; } int ShaderDiskCache::Clear( diff --git a/content/common/gpu/client/gl_helper.cc b/content/common/gpu/client/gl_helper.cc index c84a392..8c4a260 100644 --- a/content/common/gpu/client/gl_helper.cc +++ b/content/common/gpu/client/gl_helper.cc @@ -1145,7 +1145,7 @@ void GLHelper::CopyTextureToImpl::ReadbackYUVImpl::ReadbackYUV( swizzle_, base::Bind(&CallbackKeepingVideoFrameAlive, target, callback)); gl_->BindFramebuffer(GL_FRAMEBUFFER, 0); - media::LetterboxYUV(target, dst_subrect_); + media::LetterboxYUV(target.get(), dst_subrect_); } // YUV readback constructors. Initiates the main scaler pipeline and @@ -1283,7 +1283,7 @@ void GLHelper::CopyTextureToImpl::ReadbackYUV_MRT::ReadbackYUV( swizzle_, base::Bind(&CallbackKeepingVideoFrameAlive, target, callback)); gl_->BindFramebuffer(GL_FRAMEBUFFER, 0); - media::LetterboxYUV(target, dst_subrect_); + media::LetterboxYUV(target.get(), dst_subrect_); } bool GLHelper::IsReadbackConfigSupported(SkColorType color_type) { diff --git a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc index 21ba2a6..093fbe9 100644 --- a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc +++ b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc @@ -269,7 +269,7 @@ bool WebGraphicsContext3DCommandBufferImpl::CreateContext(bool onscreen) { bool bind_generates_resources = false; real_gl_.reset( new gpu::gles2::GLES2Implementation(gles2_helper_.get(), - gles2_share_group, + gles2_share_group.get(), transfer_buffer_.get(), bind_generates_resources, lose_context_when_out_of_memory_, diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc index 22b90a3..fa22f94 100644 --- a/content/common/gpu/gpu_command_buffer_stub.cc +++ b/content/common/gpu/gpu_command_buffer_stub.cc @@ -983,7 +983,7 @@ void GpuCommandBufferStub::OnRegisterGpuMemoryBuffer( gfx::Size(width, height), internalformat, channel()->client_id()); - if (!image) + if (!image.get()) return; // For Android specific workaround. diff --git a/content/common/gpu/media/gpu_video_decode_accelerator.cc b/content/common/gpu/media/gpu_video_decode_accelerator.cc index c1cd553..025d971 100644 --- a/content/common/gpu/media/gpu_video_decode_accelerator.cc +++ b/content/common/gpu/media/gpu_video_decode_accelerator.cc @@ -496,7 +496,7 @@ void GpuVideoDecodeAccelerator::SetTextureCleared( gpu::gles2::TextureManager* texture_manager = stub_->decoder()->GetContextGroup()->texture_manager(); DCHECK(!texture_ref->texture()->IsLevelCleared(target, 0)); - texture_manager->SetLevelCleared(texture_ref, target, 0, true); + texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true); uncleared_textures_.erase(it); } diff --git a/content/common/gpu/media/gpu_video_encode_accelerator.cc b/content/common/gpu/media/gpu_video_encode_accelerator.cc index 099c456..0fb613a 100644 --- a/content/common/gpu/media/gpu_video_encode_accelerator.cc +++ b/content/common/gpu/media/gpu_video_encode_accelerator.cc @@ -245,7 +245,7 @@ void GpuVideoEncodeAccelerator::OnEncode(int32 frame_id, frame_id, base::Passed(&shm)))); - if (!frame) { + if (!frame.get()) { DLOG(ERROR) << "GpuVideoEncodeAccelerator::OnEncode(): " "could not create VideoFrame for frame_id=" << frame_id; NotifyError(media::VideoEncodeAccelerator::kPlatformFailureError); diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc index c79e6ba..d05b6d8 100644 --- a/content/gpu/gpu_main.cc +++ b/content/gpu/gpu_main.cc @@ -348,7 +348,7 @@ int GpuMain(const MainFunctionParams& parameters) { gpu_process.set_main_thread(child_thread); - if (watchdog_thread) + if (watchdog_thread.get()) watchdog_thread->AddPowerObserver(); { |