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

Unified Diff: content/common/gpu/gpu_channel_manager.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/gpu_channel_manager.h ('k') | content/common/gpu/gpu_command_buffer_stub.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/gpu_channel_manager.cc
diff --git a/content/common/gpu/gpu_channel_manager.cc b/content/common/gpu/gpu_channel_manager.cc
index d695ff523bc908eb234688960e072d6d8100410c..c0747ec37e69130ee8ad0d07efab17f89e37d044 100644
--- a/content/common/gpu/gpu_channel_manager.cc
+++ b/content/common/gpu/gpu_channel_manager.cc
@@ -49,7 +49,7 @@ GpuChannelManager::GpuChannelManager(ChildThread* gpu_child_thread,
GpuChannelManager::~GpuChannelManager() {
gpu_channels_.clear();
- if (default_offscreen_surface_) {
+ if (default_offscreen_surface_.get()) {
default_offscreen_surface_->Destroy();
default_offscreen_surface_ = NULL;
}
@@ -90,7 +90,7 @@ GpuChannel* GpuChannelManager::LookupChannel(int32 client_id) {
if (iter == gpu_channels_.end())
return NULL;
else
- return iter->second;
+ return iter->second.get();
}
bool GpuChannelManager::OnMessageReceived(const IPC::Message& msg) {
@@ -119,13 +119,13 @@ void GpuChannelManager::OnEstablishChannel(int client_id, bool share_context) {
gfx::GLShareGroup* share_group = NULL;
gpu::gles2::MailboxManager* mailbox_manager = NULL;
if (share_context) {
- if (!share_group_) {
+ if (!share_group_.get()) {
share_group_ = new gfx::GLShareGroup;
- DCHECK(!mailbox_manager_);
+ DCHECK(!mailbox_manager_.get());
mailbox_manager_ = new gpu::gles2::MailboxManager;
}
- share_group = share_group_;
- mailbox_manager = mailbox_manager_;
+ share_group = share_group_.get();
+ mailbox_manager = mailbox_manager_.get();
}
scoped_refptr<GpuChannel> channel = new GpuChannel(this,
@@ -134,7 +134,7 @@ void GpuChannelManager::OnEstablishChannel(int client_id, bool share_context) {
mailbox_manager,
client_id,
false);
- if (channel->Init(io_message_loop_, shutdown_event_)) {
+ if (channel->Init(io_message_loop_.get(), shutdown_event_)) {
gpu_channels_[client_id] = channel;
channel_handle.name = channel->GetChannelName();
@@ -289,9 +289,9 @@ void GpuChannelManager::OnLoseAllContexts() {
}
gfx::GLSurface* GpuChannelManager::GetDefaultOffscreenSurface() {
- if (!default_offscreen_surface_) {
- default_offscreen_surface_ = gfx::GLSurface::CreateOffscreenGLSurface(
- false, gfx::Size(1, 1));
+ if (!default_offscreen_surface_.get()) {
+ default_offscreen_surface_ =
+ gfx::GLSurface::CreateOffscreenGLSurface(false, gfx::Size(1, 1));
}
return default_offscreen_surface_.get();
}
« no previous file with comments | « content/common/gpu/gpu_channel_manager.h ('k') | content/common/gpu/gpu_command_buffer_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698