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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 uint32 InsertSyncPoint() override; | 114 uint32 InsertSyncPoint() override; |
115 uint32_t InsertFutureSyncPoint() override; | 115 uint32_t InsertFutureSyncPoint() override; |
116 void RetireSyncPoint(uint32_t sync_point) override; | 116 void RetireSyncPoint(uint32_t sync_point) override; |
117 void SignalSyncPoint(uint32 sync_point, | 117 void SignalSyncPoint(uint32 sync_point, |
118 const base::Closure& callback) override; | 118 const base::Closure& callback) override; |
119 void SignalQuery(uint32 query, const base::Closure& callback) override; | 119 void SignalQuery(uint32 query, const base::Closure& callback) override; |
120 void SetSurfaceVisible(bool visible) override; | 120 void SetSurfaceVisible(bool visible) override; |
121 uint32 CreateStreamTexture(uint32 texture_id) override; | 121 uint32 CreateStreamTexture(uint32 texture_id) override; |
122 void SetLock(base::Lock* lock) override; | 122 void SetLock(base::Lock* lock) override; |
123 bool IsGpuChannelLost() override; | 123 bool IsGpuChannelLost() override; |
| 124 gpu::CommandBufferNamespace GetNamespaceID() const override; |
| 125 uint64_t GetCommandBufferID() const override; |
124 | 126 |
125 bool ProduceFrontBuffer(const gpu::Mailbox& mailbox); | 127 bool ProduceFrontBuffer(const gpu::Mailbox& mailbox); |
126 void SetContextLostCallback(const base::Closure& callback); | 128 void SetContextLostCallback(const base::Closure& callback); |
127 | 129 |
128 typedef base::Callback<void(const gpu::MemoryAllocation&)> | 130 typedef base::Callback<void(const gpu::MemoryAllocation&)> |
129 MemoryAllocationChangedCallback; | 131 MemoryAllocationChangedCallback; |
130 void SetMemoryAllocationChangedCallback( | 132 void SetMemoryAllocationChangedCallback( |
131 const MemoryAllocationChangedCallback& callback); | 133 const MemoryAllocationChangedCallback& callback); |
132 void AddDeletionObserver(DeletionObserver* observer); | 134 void AddDeletionObserver(DeletionObserver* observer); |
133 void RemoveDeletionObserver(DeletionObserver* observer); | 135 void RemoveDeletionObserver(DeletionObserver* observer); |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 | 206 |
205 // The last cached state received from the service. | 207 // The last cached state received from the service. |
206 State last_state_; | 208 State last_state_; |
207 | 209 |
208 // The shared memory area used to update state. | 210 // The shared memory area used to update state. |
209 scoped_ptr<base::SharedMemory> shared_state_shm_; | 211 scoped_ptr<base::SharedMemory> shared_state_shm_; |
210 | 212 |
211 // |*this| is owned by |*channel_| and so is always outlived by it, so using a | 213 // |*this| is owned by |*channel_| and so is always outlived by it, so using a |
212 // raw pointer is ok. | 214 // raw pointer is ok. |
213 GpuChannelHost* channel_; | 215 GpuChannelHost* channel_; |
| 216 const uint64_t command_buffer_id_; |
214 const int32 route_id_; | 217 const int32 route_id_; |
215 const int32 stream_id_; | 218 const int32 stream_id_; |
216 uint32 flush_count_; | 219 uint32 flush_count_; |
217 int32 last_put_offset_; | 220 int32 last_put_offset_; |
218 int32 last_barrier_put_offset_; | 221 int32 last_barrier_put_offset_; |
219 | 222 |
220 base::Closure context_lost_callback_; | 223 base::Closure context_lost_callback_; |
221 | 224 |
222 MemoryAllocationChangedCallback memory_allocation_changed_callback_; | 225 MemoryAllocationChangedCallback memory_allocation_changed_callback_; |
223 | 226 |
224 GpuConsoleMessageCallback console_message_callback_; | 227 GpuConsoleMessageCallback console_message_callback_; |
225 | 228 |
226 // Tasks to be invoked in SignalSyncPoint responses. | 229 // Tasks to be invoked in SignalSyncPoint responses. |
227 uint32 next_signal_id_; | 230 uint32 next_signal_id_; |
228 SignalTaskMap signal_tasks_; | 231 SignalTaskMap signal_tasks_; |
229 | 232 |
230 gpu::Capabilities capabilities_; | 233 gpu::Capabilities capabilities_; |
231 | 234 |
232 std::vector<ui::LatencyInfo> latency_info_; | 235 std::vector<ui::LatencyInfo> latency_info_; |
233 | 236 |
234 SwapBuffersCompletionCallback swap_buffers_completion_callback_; | 237 SwapBuffersCompletionCallback swap_buffers_completion_callback_; |
235 UpdateVSyncParametersCallback update_vsync_parameters_completion_callback_; | 238 UpdateVSyncParametersCallback update_vsync_parameters_completion_callback_; |
236 | 239 |
237 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); | 240 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); |
238 }; | 241 }; |
239 | 242 |
240 } // namespace content | 243 } // namespace content |
241 | 244 |
242 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ | 245 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ |
OLD | NEW |