OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ | 5 #ifndef CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ |
6 #define CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ | 6 #define CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 base::SharedMemoryHandle ShareToGpuProcess( | 146 base::SharedMemoryHandle ShareToGpuProcess( |
147 base::SharedMemoryHandle source_handle); | 147 base::SharedMemoryHandle source_handle); |
148 | 148 |
149 // Reserve one unused transfer buffer ID. | 149 // Reserve one unused transfer buffer ID. |
150 int32 ReserveTransferBufferId(); | 150 int32 ReserveTransferBufferId(); |
151 | 151 |
152 // Returns a GPU memory buffer handle to the buffer that can be sent via | 152 // Returns a GPU memory buffer handle to the buffer that can be sent via |
153 // IPC to the GPU process. The caller is responsible for ensuring it is | 153 // IPC to the GPU process. The caller is responsible for ensuring it is |
154 // closed. Returns an invalid handle on failure. | 154 // closed. Returns an invalid handle on failure. |
155 gfx::GpuMemoryBufferHandle ShareGpuMemoryBufferToGpuProcess( | 155 gfx::GpuMemoryBufferHandle ShareGpuMemoryBufferToGpuProcess( |
156 gfx::GpuMemoryBufferHandle source_handle, | 156 const gfx::GpuMemoryBufferHandle& source_handle, |
157 bool* requires_sync_point); | 157 bool* requires_sync_point); |
158 | 158 |
159 // Reserve one unused image ID. | 159 // Reserve one unused image ID. |
160 int32 ReserveImageId(); | 160 int32 ReserveImageId(); |
161 | 161 |
162 // Generate a route ID guaranteed to be unique for this channel. | 162 // Generate a route ID guaranteed to be unique for this channel. |
163 int32 GenerateRouteID(); | 163 int32 GenerateRouteID(); |
164 | 164 |
165 private: | 165 private: |
166 friend class base::RefCountedThreadSafe<GpuChannelHost>; | 166 friend class base::RefCountedThreadSafe<GpuChannelHost>; |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 // Used to look up a proxy from its routing id. | 242 // Used to look up a proxy from its routing id. |
243 typedef base::hash_map<int, CommandBufferProxyImpl*> ProxyMap; | 243 typedef base::hash_map<int, CommandBufferProxyImpl*> ProxyMap; |
244 ProxyMap proxies_; | 244 ProxyMap proxies_; |
245 | 245 |
246 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); | 246 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); |
247 }; | 247 }; |
248 | 248 |
249 } // namespace content | 249 } // namespace content |
250 | 250 |
251 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ | 251 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ |
OLD | NEW |