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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 86 // need to be flushed before they can be shared with other contexts across | 86 // need to be flushed before they can be shared with other contexts across |
| 87 // channels. Subclasses should implement these functions and take care of | 87 // channels. Subclasses should implement these functions and take care of |
| 88 // figuring out when a fence sync has been flushed. The difference between | 88 // figuring out when a fence sync has been flushed. The difference between |
| 89 // IsFenceSyncFlushed and IsFenceSyncFlushReceived, one is testing is the | 89 // IsFenceSyncFlushed and IsFenceSyncFlushReceived, one is testing is the |
| 90 // client has issued the flush, and the other is testing if the service | 90 // client has issued the flush, and the other is testing if the service |
| 91 // has received the flush. | 91 // has received the flush. |
| 92 virtual uint64_t GenerateFenceSyncRelease() = 0; | 92 virtual uint64_t GenerateFenceSyncRelease() = 0; |
| 93 virtual bool IsFenceSyncRelease(uint64_t release) = 0; | 93 virtual bool IsFenceSyncRelease(uint64_t release) = 0; |
| 94 virtual bool IsFenceSyncFlushed(uint64_t release) = 0; | 94 virtual bool IsFenceSyncFlushed(uint64_t release) = 0; |
| 95 virtual bool IsFenceSyncFlushReceived(uint64_t release) = 0; | 95 virtual bool IsFenceSyncFlushReceived(uint64_t release) = 0; |
| 96 virtual bool IsFenceSyncReleased(uint64_t release) = 0; | |
|
sunnyps
2016/12/02 02:52:03
Need a better name for this...
This is the only t
| |
| 96 | 97 |
| 97 // Runs |callback| when sync token is signalled. | 98 // Runs |callback| when sync token is signalled. |
| 98 virtual void SignalSyncToken(const SyncToken& sync_token, | 99 virtual void SignalSyncToken(const SyncToken& sync_token, |
| 99 const base::Closure& callback) = 0; | 100 const base::Closure& callback) = 0; |
| 100 | 101 |
| 101 // Under some circumstances a sync token may be used which has not been | 102 // Under some circumstances a sync token may be used which has not been |
| 102 // verified to have been flushed. For example, fence syncs queued on the | 103 // verified to have been flushed. For example, fence syncs queued on the |
| 103 // same channel as the wait command guarantee that the fence sync will | 104 // same channel as the wait command guarantee that the fence sync will |
| 104 // be enqueued first so does not need to be flushed. | 105 // be enqueued first so does not need to be flushed. |
| 105 virtual bool CanWaitUnverifiedSyncToken(const SyncToken* sync_token) = 0; | 106 virtual bool CanWaitUnverifiedSyncToken(const SyncToken* sync_token) = 0; |
| 106 | 107 |
| 107 private: | 108 private: |
| 108 DISALLOW_COPY_AND_ASSIGN(GpuControl); | 109 DISALLOW_COPY_AND_ASSIGN(GpuControl); |
| 109 }; | 110 }; |
| 110 | 111 |
| 111 } // namespace gpu | 112 } // namespace gpu |
| 112 | 113 |
| 113 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ | 114 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ |
| OLD | NEW |