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

Side by Side Diff: chrome/plugin/command_buffer_stub.h

Issue 558035: [GPU] Get GPU process running on the mac... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/render_messages_internal.h ('k') | chrome/plugin/command_buffer_stub.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #ifndef CHROME_PLUGIN_COMMAND_BUFFER_STUB_H_ 5 #ifndef CHROME_PLUGIN_COMMAND_BUFFER_STUB_H_
6 #define CHROME_PLUGIN_COMMAND_BUFFER_STUB_H_ 6 #define CHROME_PLUGIN_COMMAND_BUFFER_STUB_H_
7 7
8 #if defined(ENABLE_GPU) 8 #if defined(ENABLE_GPU)
9 9
10 #include "app/gfx/native_widget_types.h" 10 #include "app/gfx/native_widget_types.h"
11 #include "base/ref_counted.h" 11 #include "base/ref_counted.h"
12 #include "gpu/command_buffer/common/command_buffer.h" 12 #include "gpu/command_buffer/common/command_buffer.h"
13 #include "gpu/command_buffer/service/command_buffer_service.h" 13 #include "gpu/command_buffer/service/command_buffer_service.h"
14 #include "gpu/command_buffer/service/gpu_processor.h" 14 #include "gpu/command_buffer/service/gpu_processor.h"
15 #include "ipc/ipc_channel.h" 15 #include "ipc/ipc_channel.h"
16 #include "ipc/ipc_message.h" 16 #include "ipc/ipc_message.h"
17 17
18 class PluginChannel; 18 class PluginChannel;
19 19
20 class CommandBufferService; 20 class CommandBufferService;
21 21
22 class CommandBufferStub : public IPC::Channel::Listener, 22 class CommandBufferStub : public IPC::Channel::Listener,
23 public IPC::Message::Sender { 23 public IPC::Message::Sender {
24 public: 24 public:
25 CommandBufferStub(PluginChannel* channel, gfx::PluginWindowHandle window); 25 CommandBufferStub(PluginChannel* channel,
26 int plugin_host_route_id,
27 gfx::PluginWindowHandle window);
26 28
27 virtual ~CommandBufferStub(); 29 virtual ~CommandBufferStub();
28 30
29 // IPC::Channel::Listener implementation: 31 // IPC::Channel::Listener implementation:
30 virtual void OnMessageReceived(const IPC::Message& message); 32 virtual void OnMessageReceived(const IPC::Message& message);
31 virtual void OnChannelError(); 33 virtual void OnChannelError();
32 34
33 // IPC::Message::Sender implementation: 35 // IPC::Message::Sender implementation:
34 virtual bool Send(IPC::Message* msg); 36 virtual bool Send(IPC::Message* msg);
35 37
36 int route_id() const { return route_id_; } 38 int route_id() const { return route_id_; }
37 39
38 private: 40 private:
39 // Message handlers: 41 // Message handlers:
40 void OnInitialize(int32 size, base::SharedMemoryHandle* ring_buffer); 42 void OnInitialize(int32 size, base::SharedMemoryHandle* ring_buffer);
41 void OnGetState(gpu::CommandBuffer::State* state); 43 void OnGetState(gpu::CommandBuffer::State* state);
42 void OnFlush(int32 put_offset, gpu::CommandBuffer::State* state); 44 void OnFlush(int32 put_offset, gpu::CommandBuffer::State* state);
43 void OnCreateTransferBuffer(int32 size, int32* id); 45 void OnCreateTransferBuffer(int32 size, int32* id);
44 void OnDestroyTransferBuffer(int32 id); 46 void OnDestroyTransferBuffer(int32 id);
45 void OnGetTransferBuffer(int32 id, 47 void OnGetTransferBuffer(int32 id,
46 base::SharedMemoryHandle* transfer_buffer, 48 base::SharedMemoryHandle* transfer_buffer,
47 size_t* size); 49 size_t* size);
50 #if defined(OS_MACOSX)
51 void OnSetWindowSize(int32 width, int32 height);
52 void SwapBuffersCallback();
53 #endif
48 54
49 scoped_refptr<PluginChannel> channel_; 55 scoped_refptr<PluginChannel> channel_;
56 int plugin_host_route_id_;
50 gfx::PluginWindowHandle window_; 57 gfx::PluginWindowHandle window_;
51 int route_id_; 58 int route_id_;
52 scoped_ptr<gpu::CommandBufferService> command_buffer_; 59 scoped_ptr<gpu::CommandBufferService> command_buffer_;
53 scoped_refptr<gpu::GPUProcessor> processor_; 60 scoped_refptr<gpu::GPUProcessor> processor_;
54 }; 61 };
55 62
56 #endif // ENABLE_GPU 63 #endif // ENABLE_GPU
57 64
58 #endif // CHROME_PLUGIN_COMMAND_BUFFER_STUB_H_ 65 #endif // CHROME_PLUGIN_COMMAND_BUFFER_STUB_H_
OLDNEW
« no previous file with comments | « chrome/common/render_messages_internal.h ('k') | chrome/plugin/command_buffer_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698