Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: content/common/gpu/client/command_buffer_proxy_impl.h

Issue 1548443002: Introducing gpu::CommandBufferId as a distinct, IdType<...>-based type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@type-safe-save-package-id-self-contained
Patch Set: Rebasing... Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <map> 11 #include <map>
12 #include <queue> 12 #include <queue>
13 #include <string> 13 #include <string>
14 14
15 #include "base/callback.h" 15 #include "base/callback.h"
16 #include "base/compiler_specific.h" 16 #include "base/compiler_specific.h"
17 #include "base/containers/hash_tables.h" 17 #include "base/containers/hash_tables.h"
18 #include "base/containers/scoped_ptr_hash_map.h" 18 #include "base/containers/scoped_ptr_hash_map.h"
19 #include "base/macros.h" 19 #include "base/macros.h"
20 #include "base/memory/ref_counted.h" 20 #include "base/memory/ref_counted.h"
21 #include "base/memory/weak_ptr.h" 21 #include "base/memory/weak_ptr.h"
22 #include "base/observer_list.h" 22 #include "base/observer_list.h"
23 #include "gpu/command_buffer/client/gpu_control.h" 23 #include "gpu/command_buffer/client/gpu_control.h"
24 #include "gpu/command_buffer/common/command_buffer.h" 24 #include "gpu/command_buffer/common/command_buffer.h"
25 #include "gpu/command_buffer/common/command_buffer_id.h"
25 #include "gpu/command_buffer/common/command_buffer_shared.h" 26 #include "gpu/command_buffer/common/command_buffer_shared.h"
26 #include "gpu/command_buffer/common/gpu_memory_allocation.h" 27 #include "gpu/command_buffer/common/gpu_memory_allocation.h"
27 #include "ipc/ipc_listener.h" 28 #include "ipc/ipc_listener.h"
28 #include "ui/events/latency_info.h" 29 #include "ui/events/latency_info.h"
29 #include "ui/gfx/swap_result.h" 30 #include "ui/gfx/swap_result.h"
30 31
31 struct GPUCommandBufferConsoleMessage; 32 struct GPUCommandBufferConsoleMessage;
32 33
33 namespace base { 34 namespace base {
34 class SharedMemory; 35 class SharedMemory;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 void DestroyImage(int32_t id) override; 115 void DestroyImage(int32_t id) override;
115 int32_t CreateGpuMemoryBufferImage(size_t width, 116 int32_t CreateGpuMemoryBufferImage(size_t width,
116 size_t height, 117 size_t height,
117 unsigned internal_format, 118 unsigned internal_format,
118 unsigned usage) override; 119 unsigned usage) override;
119 void SignalQuery(uint32_t query, const base::Closure& callback) override; 120 void SignalQuery(uint32_t query, const base::Closure& callback) override;
120 void SetLock(base::Lock* lock) override; 121 void SetLock(base::Lock* lock) override;
121 bool IsGpuChannelLost() override; 122 bool IsGpuChannelLost() override;
122 void EnsureWorkVisible() override; 123 void EnsureWorkVisible() override;
123 gpu::CommandBufferNamespace GetNamespaceID() const override; 124 gpu::CommandBufferNamespace GetNamespaceID() const override;
124 uint64_t GetCommandBufferID() const override; 125 gpu::CommandBufferId GetCommandBufferID() const override;
125 int32_t GetExtraCommandBufferData() const override; 126 int32_t GetExtraCommandBufferData() const override;
126 uint64_t GenerateFenceSyncRelease() override; 127 uint64_t GenerateFenceSyncRelease() override;
127 bool IsFenceSyncRelease(uint64_t release) override; 128 bool IsFenceSyncRelease(uint64_t release) override;
128 bool IsFenceSyncFlushed(uint64_t release) override; 129 bool IsFenceSyncFlushed(uint64_t release) override;
129 bool IsFenceSyncFlushReceived(uint64_t release) override; 130 bool IsFenceSyncFlushReceived(uint64_t release) override;
130 void SignalSyncToken(const gpu::SyncToken& sync_token, 131 void SignalSyncToken(const gpu::SyncToken& sync_token,
131 const base::Closure& callback) override; 132 const base::Closure& callback) override;
132 bool CanWaitUnverifiedSyncToken(const gpu::SyncToken* sync_token) override; 133 bool CanWaitUnverifiedSyncToken(const gpu::SyncToken* sync_token) override;
133 134
134 bool ProduceFrontBuffer(const gpu::Mailbox& mailbox); 135 bool ProduceFrontBuffer(const gpu::Mailbox& mailbox);
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 223
223 // The last cached state received from the service. 224 // The last cached state received from the service.
224 State last_state_; 225 State last_state_;
225 226
226 // The shared memory area used to update state. 227 // The shared memory area used to update state.
227 scoped_ptr<base::SharedMemory> shared_state_shm_; 228 scoped_ptr<base::SharedMemory> shared_state_shm_;
228 229
229 // |*this| is owned by |*channel_| and so is always outlived by it, so using a 230 // |*this| is owned by |*channel_| and so is always outlived by it, so using a
230 // raw pointer is ok. 231 // raw pointer is ok.
231 GpuChannelHost* channel_; 232 GpuChannelHost* channel_;
232 const uint64_t command_buffer_id_; 233 const gpu::CommandBufferId command_buffer_id_;
233 const int32_t route_id_; 234 const int32_t route_id_;
234 const int32_t stream_id_; 235 const int32_t stream_id_;
235 uint32_t flush_count_; 236 uint32_t flush_count_;
236 int32_t last_put_offset_; 237 int32_t last_put_offset_;
237 int32_t last_barrier_put_offset_; 238 int32_t last_barrier_put_offset_;
238 239
239 // Next generated fence sync. 240 // Next generated fence sync.
240 uint64_t next_fence_sync_release_; 241 uint64_t next_fence_sync_release_;
241 242
242 // Unverified flushed fence syncs with their corresponding flush id. 243 // Unverified flushed fence syncs with their corresponding flush id.
(...skipping 22 matching lines...) Expand all
265 266
266 base::WeakPtr<CommandBufferProxyImpl> weak_this_; 267 base::WeakPtr<CommandBufferProxyImpl> weak_this_;
267 scoped_refptr<base::SequencedTaskRunner> callback_thread_; 268 scoped_refptr<base::SequencedTaskRunner> callback_thread_;
268 269
269 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); 270 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl);
270 }; 271 };
271 272
272 } // namespace content 273 } // namespace content
273 274
274 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ 275 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_
OLDNEW
« no previous file with comments | « content/common/cc_messages_unittest.cc ('k') | content/common/gpu/client/command_buffer_proxy_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698