OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ | 5 #ifndef GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ |
6 #define GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ | 6 #define GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/callback.h" | 13 #include "base/callback.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "gpu/command_buffer/common/capabilities.h" | 15 #include "gpu/command_buffer/common/capabilities.h" |
| 16 #include "gpu/command_buffer/common/command_buffer_id.h" |
16 #include "gpu/command_buffer/common/constants.h" | 17 #include "gpu/command_buffer/common/constants.h" |
17 #include "gpu/command_buffer/common/mailbox.h" | 18 #include "gpu/command_buffer/common/mailbox.h" |
18 #include "gpu/gpu_export.h" | 19 #include "gpu/gpu_export.h" |
19 | 20 |
20 extern "C" typedef struct _ClientBuffer* ClientBuffer; | 21 extern "C" typedef struct _ClientBuffer* ClientBuffer; |
21 | 22 |
22 namespace base { | 23 namespace base { |
23 class Lock; | 24 class Lock; |
24 } | 25 } |
25 | 26 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 // services and will be treated as a NOP for in process command buffers. | 77 // services and will be treated as a NOP for in process command buffers. |
77 virtual void EnsureWorkVisible() = 0; | 78 virtual void EnsureWorkVisible() = 0; |
78 | 79 |
79 // The namespace and command buffer ID forms a unique pair for all existing | 80 // The namespace and command buffer ID forms a unique pair for all existing |
80 // GpuControl (on client) and matches for the corresponding command buffer | 81 // GpuControl (on client) and matches for the corresponding command buffer |
81 // (on server) in a single server process. The extra command buffer data can | 82 // (on server) in a single server process. The extra command buffer data can |
82 // be used for extra identification purposes. One usage is to store some | 83 // be used for extra identification purposes. One usage is to store some |
83 // extra field to identify unverified sync tokens for the implementation of | 84 // extra field to identify unverified sync tokens for the implementation of |
84 // the CanWaitUnverifiedSyncToken() function. | 85 // the CanWaitUnverifiedSyncToken() function. |
85 virtual CommandBufferNamespace GetNamespaceID() const = 0; | 86 virtual CommandBufferNamespace GetNamespaceID() const = 0; |
86 virtual uint64_t GetCommandBufferID() const = 0; | 87 virtual CommandBufferId GetCommandBufferID() const = 0; |
87 virtual int32_t GetExtraCommandBufferData() const = 0; | 88 virtual int32_t GetExtraCommandBufferData() const = 0; |
88 | 89 |
89 // Fence Syncs use release counters at a context level, these fence syncs | 90 // Fence Syncs use release counters at a context level, these fence syncs |
90 // need to be flushed before they can be shared with other contexts across | 91 // need to be flushed before they can be shared with other contexts across |
91 // channels. Subclasses should implement these functions and take care of | 92 // channels. Subclasses should implement these functions and take care of |
92 // figuring out when a fence sync has been flushed. The difference between | 93 // figuring out when a fence sync has been flushed. The difference between |
93 // IsFenceSyncFlushed and IsFenceSyncFlushReceived, one is testing is the | 94 // IsFenceSyncFlushed and IsFenceSyncFlushReceived, one is testing is the |
94 // client has issued the flush, and the other is testing if the service | 95 // client has issued the flush, and the other is testing if the service |
95 // has received the flush. | 96 // has received the flush. |
96 virtual uint64_t GenerateFenceSyncRelease() = 0; | 97 virtual uint64_t GenerateFenceSyncRelease() = 0; |
(...skipping 11 matching lines...) Expand all Loading... |
108 // be enqueued first so does not need to be flushed. | 109 // be enqueued first so does not need to be flushed. |
109 virtual bool CanWaitUnverifiedSyncToken(const SyncToken* sync_token) = 0; | 110 virtual bool CanWaitUnverifiedSyncToken(const SyncToken* sync_token) = 0; |
110 | 111 |
111 private: | 112 private: |
112 DISALLOW_COPY_AND_ASSIGN(GpuControl); | 113 DISALLOW_COPY_AND_ASSIGN(GpuControl); |
113 }; | 114 }; |
114 | 115 |
115 } // namespace gpu | 116 } // namespace gpu |
116 | 117 |
117 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ | 118 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ |
OLD | NEW |