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

Unified Diff: content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc

Issue 16294003: Update content/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 7 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 | « content/common/gpu/client/gpu_channel_host.cc ('k') | content/common/gpu/gpu_channel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
diff --git a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
index 8f003cdd14e22a1699b2a497c03a019ff4e5ccb1..8e426f319a7f9e39b8a26ab1f83008b603bde6ee 100644
--- a/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
+++ b/content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc
@@ -195,7 +195,7 @@ bool WebGraphicsContext3DCommandBufferImpl::Initialize(
gpu_preference_ = gfx::PreferDiscreteGpu;
host_ = factory_->EstablishGpuChannelSync(cause);
- if (!host_)
+ if (!host_.get())
return false;
DCHECK(host_->state() == GpuChannelHost::kConnected);
@@ -276,7 +276,7 @@ bool WebGraphicsContext3DCommandBufferImpl::MaybeInitializeGL(
bool WebGraphicsContext3DCommandBufferImpl::InitializeCommandBuffer(
bool onscreen,
const char* allowed_extensions) {
- if (!host_)
+ if (!host_.get())
return false;
// We need to lock g_all_shared_contexts to ensure that the context we picked
// for our share group isn't deleted.
@@ -438,7 +438,7 @@ void WebGraphicsContext3DCommandBufferImpl::Destroy() {
gles2_helper_ = NULL;
if (command_buffer_) {
- if (host_)
+ if (host_.get())
host_->DestroyCommandBuffer(command_buffer_);
else
delete command_buffer_;
@@ -450,11 +450,11 @@ void WebGraphicsContext3DCommandBufferImpl::Destroy() {
// TODO(apatrick,piman): This should be renamed to something clearer.
int WebGraphicsContext3DCommandBufferImpl::GetGPUProcessID() {
- return host_ ? host_->gpu_host_id() : 0;
+ return host_.get() ? host_->gpu_host_id() : 0;
}
int WebGraphicsContext3DCommandBufferImpl::GetChannelID() {
- return host_ ? host_->client_id() : 0;
+ return host_.get() ? host_->client_id() : 0;
}
int WebGraphicsContext3DCommandBufferImpl::GetContextID() {
@@ -1459,7 +1459,7 @@ WGC3Denum WebGraphicsContext3DCommandBufferImpl::getGraphicsResetStatusARB() {
bool WebGraphicsContext3DCommandBufferImpl::IsCommandBufferContextLost() {
// If the channel shut down unexpectedly, let that supersede the
// command buffer's state.
- if (host_ && host_->state() == GpuChannelHost::kLost)
+ if (host_.get() && host_->state() == GpuChannelHost::kLost)
return true;
gpu::CommandBuffer::State state = command_buffer_->GetLastState();
return state.error == gpu::error::kLostContext;
« no previous file with comments | « content/common/gpu/client/gpu_channel_host.cc ('k') | content/common/gpu/gpu_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698