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

Unified Diff: chrome/gpu/gpu_channel.h

Issue 6557006: Moved creation of GPU transfer buffers into the browser process.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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: chrome/gpu/gpu_channel.h
===================================================================
--- chrome/gpu/gpu_channel.h (revision 75655)
+++ chrome/gpu/gpu_channel.h (working copy)
@@ -11,7 +11,7 @@
#include <vector>
#include "base/id_map.h"
-#include "base/scoped_open_process.h"
+#include "base/process.h"
#include "base/scoped_ptr.h"
#include "build/build_config.h"
#include "chrome/common/gpu_create_command_buffer_config.h"
@@ -32,7 +32,9 @@
public IPC::Message::Sender,
public base::RefCountedThreadSafe<GpuChannel> {
public:
- GpuChannel(GpuThread* gpu_thread, int renderer_id);
+ // Takes ownership of the renderer process handle.
+ GpuChannel(GpuThread* gpu_thread,
+ int renderer_id);
virtual ~GpuChannel();
bool Init();
@@ -47,14 +49,14 @@
int GetRendererFileDescriptor();
#endif // defined(OS_POSIX)
- base::ProcessHandle renderer_handle() const {
- return renderer_process_.handle();
+ base::ProcessHandle renderer_process() const {
+ return renderer_process_;
}
// IPC::Channel::Listener implementation:
virtual bool OnMessageReceived(const IPC::Message& msg);
+ virtual void OnChannelError();
virtual void OnChannelConnected(int32 peer_pid);
- virtual void OnChannelError();
// IPC::Message::Sender implementation:
virtual bool Send(IPC::Message* msg);
@@ -79,6 +81,7 @@
int GenerateRouteID();
// Message handlers.
+ void OnInitialize(base::ProcessHandle renderer_process);
void OnCreateOffscreenCommandBuffer(
int32 parent_route_id,
const gfx::Size& size,
@@ -98,12 +101,15 @@
scoped_ptr<IPC::SyncChannel> channel_;
- // Handle to the renderer process who is on the other side of the channel.
- base::ScopedOpenProcess renderer_process_;
-
// The id of the renderer who is on the other side of the channel.
int renderer_id_;
+ // Handle to the renderer process that is on the other side of the channel.
+ base::ProcessHandle renderer_process_;
+
+ // The process id of the renderer process.
+ base::ProcessId renderer_pid_;
+
// Used to implement message routing functionality to CommandBuffer objects
MessageRouter router_;

Powered by Google App Engine
This is Rietveld 408576698