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

Unified Diff: chrome/gpu/gpu_channel.h

Issue 1136006: Calling OpenGL from the renderer process. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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 | « chrome/common/render_messages_internal.h ('k') | chrome/gpu/gpu_channel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/gpu/gpu_channel.h
===================================================================
--- chrome/gpu/gpu_channel.h (revision 42644)
+++ chrome/gpu/gpu_channel.h (working copy)
@@ -13,6 +13,8 @@
#include "build/build_config.h"
#include "chrome/common/message_router.h"
#include "chrome/gpu/gpu_command_buffer_stub.h"
+#include "gfx/native_widget_types.h"
+#include "gfx/size.h"
#include "ipc/ipc_channel.h"
#include "ipc/ipc_message.h"
#include "ipc/ipc_sync_channel.h"
@@ -23,18 +25,13 @@
public IPC::Message::Sender,
public base::RefCountedThreadSafe<GpuChannel> {
public:
- // Get a new GpuChannel object for the current process to talk to the
- // given renderer process. The renderer ID is an opaque unique ID generated
- // by the browser.
- //
- // POSIX only: If |channel_fd| > 0, use that file descriptor for the
- // channel socket.
- static GpuChannel* EstablishGpuChannel(int renderer_id);
-
+ explicit GpuChannel(int renderer_id);
virtual ~GpuChannel();
- std::string channel_name() const { return channel_name_; }
+ bool Init();
+ std::string GetChannelName();
+
base::ProcessHandle renderer_handle() const {
return renderer_process_.handle();
}
@@ -60,21 +57,20 @@
virtual bool Send(IPC::Message* msg);
private:
- // Called on the plugin thread
- GpuChannel();
-
- bool Init(const std::string& channel_name);
-
void OnControlMessageReceived(const IPC::Message& msg);
int GenerateRouteID();
// Message handlers.
- void OnCreateCommandBuffer(int* instance_id);
- void OnDestroyCommandBuffer(int instance_id);
+ void OnCreateViewCommandBuffer(gfx::NativeViewId view,
+ int32* route_id);
+ void OnCreateOffscreenCommandBuffer(int32 parent_route_id,
+ const gfx::Size& size,
+ uint32 parent_texture_id,
+ int32* route_id);
+ void OnDestroyCommandBuffer(int32 route_id);
scoped_ptr<IPC::SyncChannel> channel_;
- std::string channel_name_;
// Handle to the renderer process who is on the other side of the channel.
base::ScopedOpenProcess renderer_process_;
@@ -92,7 +88,7 @@
MessageRouter router_;
#if defined(ENABLE_GPU)
- typedef base::hash_map<int, scoped_refptr<GpuCommandBufferStub> > StubMap;
+ typedef base::hash_map<int32, scoped_refptr<GpuCommandBufferStub> > StubMap;
StubMap stubs_;
#endif
« no previous file with comments | « chrome/common/render_messages_internal.h ('k') | chrome/gpu/gpu_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698