| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 // the GPU implementation if it is to be used from multiple threads. This | 80 // the GPU implementation if it is to be used from multiple threads. This |
| 81 // may not be supported with all implementations. | 81 // may not be supported with all implementations. |
| 82 virtual void SetLock(base::Lock*) = 0; | 82 virtual void SetLock(base::Lock*) = 0; |
| 83 | 83 |
| 84 // Returns true if the channel to the Gpu is lost. When true, all contexts | 84 // Returns true if the channel to the Gpu is lost. When true, all contexts |
| 85 // should be considered as lost. | 85 // should be considered as lost. |
| 86 virtual bool IsGpuChannelLost() = 0; | 86 virtual bool IsGpuChannelLost() = 0; |
| 87 | 87 |
| 88 // The namespace and command buffer ID forms a unique pair for all existing | 88 // The namespace and command buffer ID forms a unique pair for all existing |
| 89 // GpuControl (on client) and matches for the corresponding command buffer | 89 // GpuControl (on client) and matches for the corresponding command buffer |
| 90 // (on server) in a single server process. The extra command buffer data can | 90 // (on server) in a single server process. |
| 91 // be used for extra identification purposes. One usage is to store some | |
| 92 // extra field to identify unverified sync tokens for the implementation of | |
| 93 // the CanWaitUnverifiedSyncToken() function. | |
| 94 virtual CommandBufferNamespace GetNamespaceID() const = 0; | 91 virtual CommandBufferNamespace GetNamespaceID() const = 0; |
| 95 virtual uint64_t GetCommandBufferID() const = 0; | 92 virtual uint64_t GetCommandBufferID() const = 0; |
| 96 virtual int32_t GetExtraCommandBufferData() const = 0; | |
| 97 | 93 |
| 98 // Fence Syncs use release counters at a context level, these fence syncs | 94 // Fence Syncs use release counters at a context level, these fence syncs |
| 99 // need to be flushed before they can be shared with other contexts across | 95 // need to be flushed before they can be shared with other contexts across |
| 100 // channels. Subclasses should implement these functions and take care of | 96 // channels. Subclasses should implement these functions and take care of |
| 101 // figuring out when a fence sync has been flushed. The difference between | 97 // figuring out when a fence sync has been flushed. The difference between |
| 102 // IsFenceSyncFlushed and IsFenceSyncFlushReceived, one is testing is the | 98 // IsFenceSyncFlushed and IsFenceSyncFlushReceived, one is testing is the |
| 103 // client has issued the flush, and the other is testing if the service | 99 // client has issued the flush, and the other is testing if the service |
| 104 // has received the flush. | 100 // has received the flush. |
| 105 virtual uint64_t GenerateFenceSyncRelease() = 0; | 101 virtual uint64_t GenerateFenceSyncRelease() = 0; |
| 106 virtual bool IsFenceSyncRelease(uint64_t release) = 0; | 102 virtual bool IsFenceSyncRelease(uint64_t release) = 0; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 117 // be enqueued first so does not need to be flushed. | 113 // be enqueued first so does not need to be flushed. |
| 118 virtual bool CanWaitUnverifiedSyncToken(const SyncToken* sync_token) = 0; | 114 virtual bool CanWaitUnverifiedSyncToken(const SyncToken* sync_token) = 0; |
| 119 | 115 |
| 120 private: | 116 private: |
| 121 DISALLOW_COPY_AND_ASSIGN(GpuControl); | 117 DISALLOW_COPY_AND_ASSIGN(GpuControl); |
| 122 }; | 118 }; |
| 123 | 119 |
| 124 } // namespace gpu | 120 } // namespace gpu |
| 125 | 121 |
| 126 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ | 122 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ |
| OLD | NEW |