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

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

Issue 2127693002: Use ChannelMojo for GpuChannels. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo-channel-gpu
Patch Set: rebase Created 4 years, 5 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/ipc/service/gpu_channel.h ('k') | gpu/ipc/service/gpu_channel_test_common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/ipc/service/gpu_channel.cc
diff --git a/gpu/ipc/service/gpu_channel.cc b/gpu/ipc/service/gpu_channel.cc
index 7486adf1c78d96174efce0630bddb5bb2a544768..83a14bf3f6f63e033381d494403a3abd145c7ad1 100644
--- a/gpu/ipc/service/gpu_channel.cc
+++ b/gpu/ipc/service/gpu_channel.cc
@@ -591,7 +591,6 @@ GpuChannel::GpuChannel(GpuChannelManager* gpu_channel_manager,
: gpu_channel_manager_(gpu_channel_manager),
sync_point_manager_(sync_point_manager),
unhandled_message_listener_(nullptr),
- channel_id_(IPC::Channel::GenerateVerifiedChannelID("gpu")),
preempting_flag_(preempting_flag),
preempted_flag_(preempted_flag),
client_id_(client_id),
@@ -629,23 +628,19 @@ IPC::ChannelHandle GpuChannel::Init(base::WaitableEvent* shutdown_event) {
DCHECK(shutdown_event);
DCHECK(!channel_);
- IPC::ChannelHandle channel_handle(channel_id_);
+ IPC::ChannelHandle client_handle;
+ IPC::ChannelHandle server_handle;
+ IPC::Channel::GenerateMojoChannelHandlePair(
+ "gpu", &client_handle, &server_handle);
+ channel_id_ = client_handle.name;
channel_ =
- IPC::SyncChannel::Create(channel_handle, IPC::Channel::MODE_SERVER, this,
- io_task_runner_, false, shutdown_event);
-
-#if defined(OS_POSIX)
- // On POSIX, pass the renderer-side FD. Also mark it as auto-close so
- // that it gets closed after it has been sent.
- base::ScopedFD renderer_fd = channel_->TakeClientFileDescriptor();
- DCHECK(renderer_fd.is_valid());
- channel_handle.socket = base::FileDescriptor(std::move(renderer_fd));
-#endif
+ IPC::SyncChannel::Create(server_handle, IPC::Channel::MODE_SERVER,
+ this, io_task_runner_, false, shutdown_event);
channel_->AddFilter(filter_.get());
- return channel_handle;
+ return client_handle;
}
void GpuChannel::SetUnhandledMessageListener(IPC::Listener* listener) {
« no previous file with comments | « gpu/ipc/service/gpu_channel.h ('k') | gpu/ipc/service/gpu_channel_test_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698