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. This is used in addition to | |
piman
2017/03/13 23:17:39
nit: it doesn't return anything.
sunnyps
2017/03/15 00:03:08
Done.
| |
106 // WaitSyncToken in the command buffer. The wait command is used to pull | |
107 // texture updates from other threads when used with MailboxManagerSync. | |
piman
2017/03/13 23:17:39
I don't think this one has anything to do with pul
sunnyps
2017/03/15 00:03:08
The comment was about why the WaitSyncToken comman
| |
108 virtual void WaitSyncToken(const SyncToken& sync_token) = 0; | |
109 | |
105 // Under some circumstances a sync token may be used which has not been | 110 // 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 | 111 // 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 | 112 // channel as the wait command guarantee that the fence sync will be enqueued |
108 // be enqueued first so does not need to be flushed. | 113 // first so does not need to be flushed. |
109 virtual bool CanWaitUnverifiedSyncToken(const SyncToken* sync_token) = 0; | 114 virtual bool CanWaitUnverifiedSyncToken(const SyncToken& sync_token) = 0; |
110 | 115 |
111 private: | 116 private: |
112 DISALLOW_COPY_AND_ASSIGN(GpuControl); | 117 DISALLOW_COPY_AND_ASSIGN(GpuControl); |
113 }; | 118 }; |
114 | 119 |
115 } // namespace gpu | 120 } // namespace gpu |
116 | 121 |
117 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ | 122 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ |
OLD | NEW |