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_COMMAND_BUFFER_PROXY_IMPL_H_ | 5 #ifndef CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ |
6 #define CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ | 6 #define CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <queue> | 9 #include <queue> |
10 #include <string> | 10 #include <string> |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 | 153 |
154 GpuChannelHost* channel() const { return channel_; } | 154 GpuChannelHost* channel() const { return channel_; } |
155 | 155 |
156 base::SharedMemoryHandle GetSharedStateHandle() const { | 156 base::SharedMemoryHandle GetSharedStateHandle() const { |
157 return shared_state_shm_->handle(); | 157 return shared_state_shm_->handle(); |
158 } | 158 } |
159 | 159 |
160 private: | 160 private: |
161 typedef std::map<int32, scoped_refptr<gpu::Buffer> > TransferBufferMap; | 161 typedef std::map<int32, scoped_refptr<gpu::Buffer> > TransferBufferMap; |
162 typedef base::hash_map<uint32, base::Closure> SignalTaskMap; | 162 typedef base::hash_map<uint32, base::Closure> SignalTaskMap; |
163 typedef base::ScopedPtrHashMap<int32, gfx::GpuMemoryBuffer> | 163 typedef base::ScopedPtrHashMap<int32, scoped_ptr<gfx::GpuMemoryBuffer>> |
164 GpuMemoryBufferMap; | 164 GpuMemoryBufferMap; |
165 | 165 |
166 void CheckLock() { | 166 void CheckLock() { |
167 if (lock_) | 167 if (lock_) |
168 lock_->AssertAcquired(); | 168 lock_->AssertAcquired(); |
169 } | 169 } |
170 | 170 |
171 // Send an IPC message over the GPU channel. This is private to fully | 171 // Send an IPC message over the GPU channel. This is private to fully |
172 // encapsulate the channel; all callers of this function must explicitly | 172 // encapsulate the channel; all callers of this function must explicitly |
173 // verify that the context has not been lost. | 173 // verify that the context has not been lost. |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 | 228 |
229 SwapBuffersCompletionCallback swap_buffers_completion_callback_; | 229 SwapBuffersCompletionCallback swap_buffers_completion_callback_; |
230 UpdateVSyncParametersCallback update_vsync_parameters_completion_callback_; | 230 UpdateVSyncParametersCallback update_vsync_parameters_completion_callback_; |
231 | 231 |
232 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); | 232 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); |
233 }; | 233 }; |
234 | 234 |
235 } // namespace content | 235 } // namespace content |
236 | 236 |
237 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ | 237 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ |
OLD | NEW |