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 GPU_IPC_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ | 5 #ifndef GPU_IPC_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ |
6 #define GPU_IPC_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ | 6 #define GPU_IPC_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 gpu::CommandBufferNamespace GetNamespaceID() const override; | 118 gpu::CommandBufferNamespace GetNamespaceID() const override; |
119 gpu::CommandBufferId GetCommandBufferID() const override; | 119 gpu::CommandBufferId GetCommandBufferID() const override; |
120 int32_t GetExtraCommandBufferData() const override; | 120 int32_t GetExtraCommandBufferData() const override; |
121 uint64_t GenerateFenceSyncRelease() override; | 121 uint64_t GenerateFenceSyncRelease() override; |
122 bool IsFenceSyncRelease(uint64_t release) override; | 122 bool IsFenceSyncRelease(uint64_t release) override; |
123 bool IsFenceSyncFlushed(uint64_t release) override; | 123 bool IsFenceSyncFlushed(uint64_t release) override; |
124 bool IsFenceSyncFlushReceived(uint64_t release) override; | 124 bool IsFenceSyncFlushReceived(uint64_t release) override; |
125 bool IsFenceSyncReleased(uint64_t release) override; | 125 bool IsFenceSyncReleased(uint64_t release) override; |
126 void SignalSyncToken(const gpu::SyncToken& sync_token, | 126 void SignalSyncToken(const gpu::SyncToken& sync_token, |
127 const base::Closure& callback) override; | 127 const base::Closure& callback) override; |
128 bool CanWaitUnverifiedSyncToken(const gpu::SyncToken* sync_token) override; | 128 void WaitSyncToken(const gpu::SyncToken& sync_token) override; |
| 129 bool CanWaitUnverifiedSyncToken(const gpu::SyncToken& sync_token) override; |
129 | 130 |
130 void TakeFrontBuffer(const gpu::Mailbox& mailbox); | 131 void TakeFrontBuffer(const gpu::Mailbox& mailbox); |
131 void ReturnFrontBuffer(const gpu::Mailbox& mailbox, | 132 void ReturnFrontBuffer(const gpu::Mailbox& mailbox, |
132 const gpu::SyncToken& sync_token, | 133 const gpu::SyncToken& sync_token, |
133 bool is_lost); | 134 bool is_lost); |
134 | 135 |
135 void AddDeletionObserver(DeletionObserver* observer); | 136 void AddDeletionObserver(DeletionObserver* observer); |
136 void RemoveDeletionObserver(DeletionObserver* observer); | 137 void RemoveDeletionObserver(DeletionObserver* observer); |
137 | 138 |
138 bool EnsureBackbuffer(); | 139 bool EnsureBackbuffer(); |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 // Client that wants to listen for important events on the GpuControl. | 254 // Client that wants to listen for important events on the GpuControl. |
254 gpu::GpuControlClient* gpu_control_client_; | 255 gpu::GpuControlClient* gpu_control_client_; |
255 | 256 |
256 // Unowned list of DeletionObservers. | 257 // Unowned list of DeletionObservers. |
257 base::ObserverList<DeletionObserver> deletion_observers_; | 258 base::ObserverList<DeletionObserver> deletion_observers_; |
258 | 259 |
259 scoped_refptr<GpuChannelHost> channel_; | 260 scoped_refptr<GpuChannelHost> channel_; |
260 const gpu::CommandBufferId command_buffer_id_; | 261 const gpu::CommandBufferId command_buffer_id_; |
261 const int32_t route_id_; | 262 const int32_t route_id_; |
262 const int32_t stream_id_; | 263 const int32_t stream_id_; |
263 uint32_t flush_count_; | 264 uint32_t flush_count_ = 0; |
264 int32_t last_put_offset_; | 265 int32_t last_put_offset_ = -1; |
265 int32_t last_barrier_put_offset_; | 266 int32_t last_barrier_put_offset_ = -1; |
266 | 267 |
267 // Next generated fence sync. | 268 // Next generated fence sync. |
268 uint64_t next_fence_sync_release_; | 269 uint64_t next_fence_sync_release_ = 1; |
| 270 |
| 271 std::vector<SyncToken> pending_sync_token_fences_; |
269 | 272 |
270 // Unverified flushed fence syncs with their corresponding flush id. | 273 // Unverified flushed fence syncs with their corresponding flush id. |
271 std::queue<std::pair<uint64_t, uint32_t>> flushed_release_flush_id_; | 274 std::queue<std::pair<uint64_t, uint32_t>> flushed_release_flush_id_; |
272 | 275 |
273 // Last flushed fence sync release, same as last item in queue if not empty. | 276 // Last flushed fence sync release, same as last item in queue if not empty. |
274 uint64_t flushed_fence_sync_release_; | 277 uint64_t flushed_fence_sync_release_ = 0; |
275 | 278 |
276 // Last verified fence sync. | 279 // Last verified fence sync. |
277 uint64_t verified_fence_sync_release_; | 280 uint64_t verified_fence_sync_release_ = 0; |
278 | 281 |
279 GpuConsoleMessageCallback console_message_callback_; | 282 GpuConsoleMessageCallback console_message_callback_; |
280 | 283 |
281 // Tasks to be invoked in SignalSyncPoint responses. | 284 // Tasks to be invoked in SignalSyncPoint responses. |
282 uint32_t next_signal_id_; | 285 uint32_t next_signal_id_ = 0; |
283 SignalTaskMap signal_tasks_; | 286 SignalTaskMap signal_tasks_; |
284 | 287 |
285 gpu::Capabilities capabilities_; | 288 gpu::Capabilities capabilities_; |
286 | 289 |
287 std::vector<ui::LatencyInfo> latency_info_; | 290 std::vector<ui::LatencyInfo> latency_info_; |
288 | 291 |
289 SwapBuffersCompletionCallback swap_buffers_completion_callback_; | 292 SwapBuffersCompletionCallback swap_buffers_completion_callback_; |
290 UpdateVSyncParametersCallback update_vsync_parameters_completion_callback_; | 293 UpdateVSyncParametersCallback update_vsync_parameters_completion_callback_; |
291 | 294 |
292 base::WeakPtr<CommandBufferProxyImpl> weak_this_; | 295 base::WeakPtr<CommandBufferProxyImpl> weak_this_; |
293 scoped_refptr<base::SequencedTaskRunner> callback_thread_; | 296 scoped_refptr<base::SequencedTaskRunner> callback_thread_; |
294 | 297 |
295 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); | 298 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); |
296 }; | 299 }; |
297 | 300 |
298 } // namespace gpu | 301 } // namespace gpu |
299 | 302 |
300 #endif // GPU_IPC_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ | 303 #endif // GPU_IPC_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ |
OLD | NEW |