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 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 | 91 |
92 // Returns true if the service has received the fence sync. Used for verifying | 92 // Returns true if the service has received the fence sync. Used for verifying |
93 // sync tokens. | 93 // sync tokens. |
94 virtual bool IsFenceSyncFlushReceived(uint64_t release) = 0; | 94 virtual bool IsFenceSyncFlushReceived(uint64_t release) = 0; |
95 | 95 |
96 // Returns true if the service has released (executed) the fence sync. Some | 96 // Returns true if the service has released (executed) the fence sync. Some |
97 // implementations may support calling this from any thread without holding | 97 // implementations may support calling this from any thread without holding |
98 // the lock provided by the client. | 98 // the lock provided by the client. |
99 virtual bool IsFenceSyncReleased(uint64_t release) = 0; | 99 virtual bool IsFenceSyncReleased(uint64_t release) = 0; |
100 | 100 |
101 // Runs |callback| when sync token is signalled. | 101 // Runs |callback| when sync token is signaled. |
102 virtual void SignalSyncToken(const SyncToken& sync_token, | 102 virtual void SignalSyncToken(const SyncToken& sync_token, |
103 const base::Closure& callback) = 0; | 103 const base::Closure& callback) = 0; |
104 | 104 |
| 105 // This allows the command buffer proxy to mark the next flush with sync token |
| 106 // dependencies for the gpu scheduler. This is used in addition to the |
| 107 // WaitSyncToken command in the command buffer which is still needed. For |
| 108 // example, the WaitSyncToken command is used to pull texture updates when |
| 109 // used in conjunction with MailboxManagerSync. |
| 110 virtual void WaitSyncTokenHint(const SyncToken& sync_token) = 0; |
| 111 |
105 // Under some circumstances a sync token may be used which has not been | 112 // Under some circumstances a sync token may be used which has not been |
106 // verified to have been flushed. For example, fence syncs queued on the | 113 // verified to have been flushed. For example, fence syncs queued on the same |
107 // same channel as the wait command guarantee that the fence sync will | 114 // channel as the wait command guarantee that the fence sync will be enqueued |
108 // be enqueued first so does not need to be flushed. | 115 // first so does not need to be flushed. |
109 virtual bool CanWaitUnverifiedSyncToken(const SyncToken* sync_token) = 0; | 116 virtual bool CanWaitUnverifiedSyncToken(const SyncToken& sync_token) = 0; |
110 | 117 |
111 private: | 118 private: |
112 DISALLOW_COPY_AND_ASSIGN(GpuControl); | 119 DISALLOW_COPY_AND_ASSIGN(GpuControl); |
113 }; | 120 }; |
114 | 121 |
115 } // namespace gpu | 122 } // namespace gpu |
116 | 123 |
117 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ | 124 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ |
OLD | NEW |