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

Side by Side Diff: chrome/gpu/gpu_thread.cc

Issue 5598010: Convert over to channel handles (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fixed up bad whitespace Created 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/gpu/gpu_thread.h" 5 #include "chrome/gpu/gpu_thread.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "app/gfx/gl/gl_context.h" 10 #include "app/gfx/gl/gl_context.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 if (channel->Init()) 88 if (channel->Init())
89 gpu_channels_[renderer_id] = channel; 89 gpu_channels_[renderer_id] = channel;
90 else 90 else
91 channel = NULL; 91 channel = NULL;
92 92
93 if (channel.get()) { 93 if (channel.get()) {
94 channel_handle.name = channel->GetChannelName(); 94 channel_handle.name = channel->GetChannelName();
95 #if defined(OS_POSIX) 95 #if defined(OS_POSIX)
96 // On POSIX, pass the renderer-side FD. Also mark it as auto-close so 96 // On POSIX, pass the renderer-side FD. Also mark it as auto-close so
97 // that it gets closed after it has been sent. 97 // that it gets closed after it has been sent.
98 int renderer_fd = channel->DisownRendererFd(); 98 int renderer_fd = channel->GetRendererFileDescriptor();
99 channel_handle.socket = base::FileDescriptor(renderer_fd, true); 99 channel_handle.socket = base::FileDescriptor(renderer_fd, false);
100 #endif 100 #endif
101 } 101 }
102 102
103 Send(new GpuHostMsg_ChannelEstablished(channel_handle, gpu_info_)); 103 Send(new GpuHostMsg_ChannelEstablished(channel_handle, gpu_info_));
104 } 104 }
105 105
106 void GpuThread::OnSynchronize() { 106 void GpuThread::OnSynchronize() {
107 Send(new GpuHostMsg_SynchronizeReply()); 107 Send(new GpuHostMsg_SynchronizeReply());
108 } 108 }
109 109
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 NewRunnableFunction(&GpuThread::SetDxDiagnostics, thread, node)); 150 NewRunnableFunction(&GpuThread::SetDxDiagnostics, thread, node));
151 } 151 }
152 152
153 // Runs on the GPU thread. 153 // Runs on the GPU thread.
154 void GpuThread::SetDxDiagnostics(GpuThread* thread, const DxDiagNode& node) { 154 void GpuThread::SetDxDiagnostics(GpuThread* thread, const DxDiagNode& node) {
155 thread->gpu_info_.SetDxDiagnostics(node); 155 thread->gpu_info_.SetDxDiagnostics(node);
156 thread->gpu_info_.SetProgress(GPUInfo::kComplete); 156 thread->gpu_info_.SetProgress(GPUInfo::kComplete);
157 } 157 }
158 158
159 #endif 159 #endif
OLDNEW
« no previous file with comments | « chrome/gpu/gpu_channel.cc ('k') | chrome/plugin/plugin_channel.h » ('j') | ipc/ipc_channel.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698