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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 int render_view_id); |
58 | 58 |
59 // Create and connect to a command buffer in the GPU process. | 59 // Create and connect to a command buffer in the GPU process. |
60 CommandBufferProxy* CreateOffscreenCommandBuffer(CommandBufferProxy* parent, | 60 CommandBufferProxy* CreateOffscreenCommandBuffer(CommandBufferProxy* parent, |
61 const gfx::Size& size, | 61 const gfx::Size& size, |
62 uint32 parent_texture_id); | 62 uint32 parent_texture_id); |
63 | 63 |
64 | |
65 // Destroy a command buffer created by this channel. | 64 // Destroy a command buffer created by this channel. |
66 void DestroyCommandBuffer(CommandBufferProxy* command_buffer); | 65 void DestroyCommandBuffer(CommandBufferProxy* command_buffer); |
67 | 66 |
68 private: | 67 private: |
69 State state_; | 68 State state_; |
70 | 69 |
71 scoped_ptr<IPC::SyncChannel> channel_; | 70 scoped_ptr<IPC::SyncChannel> channel_; |
72 | 71 |
73 // Used to implement message routing functionality to CommandBufferProxy | 72 // Used to implement message routing functionality to CommandBufferProxy |
74 // objects | 73 // objects |
75 MessageRouter router_; | 74 MessageRouter router_; |
76 | 75 |
77 // Keep track of all the registered CommandBufferProxies to | 76 // Keep track of all the registered CommandBufferProxies to |
78 // inform about OnChannelError | 77 // inform about OnChannelError |
79 typedef base::hash_map<int, IPC::Channel::Listener*> ProxyMap; | 78 typedef base::hash_map<int, IPC::Channel::Listener*> ProxyMap; |
80 ProxyMap proxies_; | 79 ProxyMap proxies_; |
81 | 80 |
82 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); | 81 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); |
83 }; | 82 }; |
84 | 83 |
85 #endif // CHROME_RENDERER_GPU_CHANNEL_HOST_H_ | 84 #endif // CHROME_RENDERER_GPU_CHANNEL_HOST_H_ |
OLD | NEW |