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

Unified Diff: gpu/ipc/service/gpu_channel_manager.cc

Issue 2601993002: Remove base::ScopedPtrHashMap from gpu/ipc/service/. (Closed)
Patch Set: Created 4 years 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
« gpu/ipc/service/gpu_channel.cc ('K') | « gpu/ipc/service/gpu_channel_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/ipc/service/gpu_channel_manager.cc
diff --git a/gpu/ipc/service/gpu_channel_manager.cc b/gpu/ipc/service/gpu_channel_manager.cc
index 34f2be4a1cc5821e563a64701cd52f22328f9a4a..8758a5acf69663579a228f4539730bbbfa1f1057 100644
--- a/gpu/ipc/service/gpu_channel_manager.cc
+++ b/gpu/ipc/service/gpu_channel_manager.cc
@@ -120,7 +120,7 @@ void GpuChannelManager::RemoveChannel(int client_id) {
GpuChannel* GpuChannelManager::LookupChannel(int32_t client_id) const {
const auto& it = gpu_channels_.find(client_id);
- return it != gpu_channels_.end() ? it->second : nullptr;
+ return it != gpu_channels_.end() ? it->second.get() : nullptr;
}
std::unique_ptr<GpuChannel> GpuChannelManager::CreateGpuChannel(
@@ -147,7 +147,7 @@ IPC::ChannelHandle GpuChannelManager::EstablishChannel(
CreateGpuChannel(client_id, client_tracing_id, preempts,
allow_view_command_buffers, allow_real_time_streams));
IPC::ChannelHandle channel_handle = channel->Init(shutdown_event_);
- gpu_channels_.set(client_id, std::move(channel));
+ gpu_channels_[client_id] = std::move(channel);
return channel_handle;
}
@@ -275,7 +275,7 @@ void GpuChannelManager::ScheduleWakeUpGpu() {
void GpuChannelManager::DoWakeUpGpu() {
const GpuCommandBufferStub* stub = nullptr;
for (const auto& kv : gpu_channels_) {
- const GpuChannel* channel = kv.second;
+ const GpuChannel* channel = kv.second.get();
stub = channel->GetOneStub();
if (stub) {
DCHECK(stub->decoder());
« gpu/ipc/service/gpu_channel.cc ('K') | « gpu/ipc/service/gpu_channel_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698