Chromium Code Reviews| 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 // Returns true if the wait is valid. | |
|
jbauman
2017/03/09 02:00:09
Also comment that the wait command-buffer command
sunnyps
2017/03/10 03:26:20
Done.
| |
| 106 virtual void WaitSyncToken(const SyncToken& sync_token) = 0; | |
| 107 | |
| 105 // Under some circumstances a sync token may be used which has not been | 108 // 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 | 109 // 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 | 110 // channel as the wait command guarantee that the fence sync will be enqueued |
| 108 // be enqueued first so does not need to be flushed. | 111 // first so does not need to be flushed. |
| 109 virtual bool CanWaitUnverifiedSyncToken(const SyncToken* sync_token) = 0; | 112 virtual bool CanWaitUnverifiedSyncToken(const SyncToken& sync_token) = 0; |
| 110 | 113 |
| 111 private: | 114 private: |
| 112 DISALLOW_COPY_AND_ASSIGN(GpuControl); | 115 DISALLOW_COPY_AND_ASSIGN(GpuControl); |
| 113 }; | 116 }; |
| 114 | 117 |
| 115 } // namespace gpu | 118 } // namespace gpu |
| 116 | 119 |
| 117 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ | 120 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ |
| OLD | NEW |