| OLD | NEW |
| 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 #ifndef CHROME_RENDERER_GPU_CHANNEL_HOST_H_ | 5 #ifndef CHROME_RENDERER_GPU_CHANNEL_HOST_H_ |
| 6 #define CHROME_RENDERER_GPU_CHANNEL_HOST_H_ | 6 #define CHROME_RENDERER_GPU_CHANNEL_HOST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 // IPC::Channel::Listener implementation: | 47 // IPC::Channel::Listener implementation: |
| 48 virtual void OnMessageReceived(const IPC::Message& msg); | 48 virtual void OnMessageReceived(const IPC::Message& msg); |
| 49 virtual void OnChannelConnected(int32 peer_pid); | 49 virtual void OnChannelConnected(int32 peer_pid); |
| 50 virtual void OnChannelError(); | 50 virtual void OnChannelError(); |
| 51 | 51 |
| 52 // IPC::Message::Sender implementation: | 52 // IPC::Message::Sender implementation: |
| 53 virtual bool Send(IPC::Message* msg); | 53 virtual bool Send(IPC::Message* msg); |
| 54 | 54 |
| 55 // Create and connect to a command buffer in the GPU process. | 55 // Create and connect to a command buffer in the GPU process. |
| 56 CommandBufferProxy* CreateViewCommandBuffer(gfx::NativeViewId view); | 56 CommandBufferProxy* CreateViewCommandBuffer(gfx::NativeViewId view, |
| 57 int render_view_id); |
| 57 | 58 |
| 58 // Create and connect to a command buffer in the GPU process. | 59 // Create and connect to a command buffer in the GPU process. |
| 59 CommandBufferProxy* CreateOffscreenCommandBuffer(CommandBufferProxy* parent, | 60 CommandBufferProxy* CreateOffscreenCommandBuffer(CommandBufferProxy* parent, |
| 60 const gfx::Size& size, | 61 const gfx::Size& size, |
| 61 uint32 parent_texture_id); | 62 uint32 parent_texture_id); |
| 62 | 63 |
| 63 | 64 |
| 64 // Destroy a command buffer created by this channel. | 65 // Destroy a command buffer created by this channel. |
| 65 void DestroyCommandBuffer(CommandBufferProxy* command_buffer); | 66 void DestroyCommandBuffer(CommandBufferProxy* command_buffer); |
| 66 | 67 |
| 67 private: | 68 private: |
| 68 State state_; | 69 State state_; |
| 69 | 70 |
| 70 scoped_ptr<IPC::SyncChannel> channel_; | 71 scoped_ptr<IPC::SyncChannel> channel_; |
| 71 | 72 |
| 72 // Used to implement message routing functionality to CommandBufferProxy | 73 // Used to implement message routing functionality to CommandBufferProxy |
| 73 // objects | 74 // objects |
| 74 MessageRouter router_; | 75 MessageRouter router_; |
| 75 | 76 |
| 76 // Keep track of all the registered CommandBufferProxies to | 77 // Keep track of all the registered CommandBufferProxies to |
| 77 // inform about OnChannelError | 78 // inform about OnChannelError |
| 78 typedef base::hash_map<int, IPC::Channel::Listener*> ProxyMap; | 79 typedef base::hash_map<int, IPC::Channel::Listener*> ProxyMap; |
| 79 ProxyMap proxies_; | 80 ProxyMap proxies_; |
| 80 | 81 |
| 81 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); | 82 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); |
| 82 }; | 83 }; |
| 83 | 84 |
| 84 #endif // CHROME_RENDERER_GPU_CHANNEL_HOST_H_ | 85 #endif // CHROME_RENDERER_GPU_CHANNEL_HOST_H_ |
| OLD | NEW |