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

Unified Diff: content/common/gpu/gpu_channel.cc

Issue 9958034: Convert plugin and GPU process to brokered handle duplication. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 8 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
Index: content/common/gpu/gpu_channel.cc
===================================================================
--- content/common/gpu/gpu_channel.cc (revision 131361)
+++ content/common/gpu/gpu_channel.cc (working copy)
@@ -40,8 +40,6 @@
bool software)
: gpu_channel_manager_(gpu_channel_manager),
client_id_(client_id),
- renderer_process_(base::kNullProcessHandle),
- renderer_pid_(base::kNullProcessId),
share_group_(share_group ? share_group : new gfx::GLShareGroup),
watchdog_(watchdog),
software_(software),
@@ -61,12 +59,7 @@
command_line->HasSwitch(switches::kDisableGpuDriverBugWorkarounds);
}
-GpuChannel::~GpuChannel() {
-#if defined(OS_WIN)
- if (renderer_process_)
- CloseHandle(renderer_process_);
-#endif
-}
+GpuChannel::~GpuChannel() { }
apatrick_chromium 2012/04/09 18:40:58 nit: drop } to next line so I can set breakpoints
jschuh 2012/04/10 19:02:12 Done.
bool GpuChannel::OnMessageReceived(const IPC::Message& message) {
if (log_messages_) {
@@ -113,10 +106,6 @@
gpu_channel_manager_->RemoveChannel(client_id_);
}
-void GpuChannel::OnChannelConnected(int32 peer_pid) {
- renderer_pid_ = peer_pid;
-}
-
bool GpuChannel::Send(IPC::Message* message) {
// The GPU process must never send a synchronous IPC message to the renderer
// process. This could result in deadlock.
@@ -211,7 +200,6 @@
// here. This is so the reply can be delayed if the scheduler is unscheduled.
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(GpuChannel, msg)
- IPC_MESSAGE_HANDLER(GpuChannelMsg_Initialize, OnInitialize)
IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuChannelMsg_CreateOffscreenCommandBuffer,
OnCreateOffscreenCommandBuffer)
IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuChannelMsg_DestroyCommandBuffer,
@@ -312,15 +300,6 @@
return num_contexts_preferring_discrete_gpu_ > 0;
}
-void GpuChannel::OnInitialize(base::ProcessHandle renderer_process) {
- // Initialize should only happen once.
- DCHECK(!renderer_process_);
-
- // Verify that the renderer has passed its own process handle.
- if (base::GetProcId(renderer_process) == renderer_pid_)
- renderer_process_ = renderer_process;
-}
-
void GpuChannel::OnCreateOffscreenCommandBuffer(
const gfx::Size& size,
const GPUCreateCommandBufferConfig& init_params,

Powered by Google App Engine
This is Rietveld 408576698