| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 // Sets a lock this will be held on every callback from the GPU | 79 // Sets a lock this will be held on every callback from the GPU |
| 80 // implementation. This lock must be set and must be held on every call into | 80 // implementation. This lock must be set and must be held on every call into |
| 81 // the GPU implementation if it is to be used from multiple threads. This | 81 // the GPU implementation if it is to be used from multiple threads. This |
| 82 // may not be supported with all implementations. | 82 // may not be supported with all implementations. |
| 83 virtual void SetLock(base::Lock*) = 0; | 83 virtual void SetLock(base::Lock*) = 0; |
| 84 | 84 |
| 85 // Returns true if the channel to the Gpu is lost. When true, all contexts | 85 // Returns true if the channel to the Gpu is lost. When true, all contexts |
| 86 // should be considered as lost. | 86 // should be considered as lost. |
| 87 virtual bool IsGpuChannelLost() = 0; | 87 virtual bool IsGpuChannelLost() = 0; |
| 88 | 88 |
| 89 // When this function returns it ensures all previously flushed work is |
| 90 // visible by the service. This command does this by sending a synchronous |
| 91 // IPC. Note just because the work is visible to the server does not mean |
| 92 // that it has been processed. This is only relevant for out of process |
| 93 // services and will be treated as a NOP for in process command buffers. |
| 94 virtual void EnsureWorkVisible() = 0; |
| 95 |
| 89 // The namespace and command buffer ID forms a unique pair for all existing | 96 // The namespace and command buffer ID forms a unique pair for all existing |
| 90 // GpuControl (on client) and matches for the corresponding command buffer | 97 // GpuControl (on client) and matches for the corresponding command buffer |
| 91 // (on server) in a single server process. The extra command buffer data can | 98 // (on server) in a single server process. The extra command buffer data can |
| 92 // be used for extra identification purposes. One usage is to store some | 99 // be used for extra identification purposes. One usage is to store some |
| 93 // extra field to identify unverified sync tokens for the implementation of | 100 // extra field to identify unverified sync tokens for the implementation of |
| 94 // the CanWaitUnverifiedSyncToken() function. | 101 // the CanWaitUnverifiedSyncToken() function. |
| 95 virtual CommandBufferNamespace GetNamespaceID() const = 0; | 102 virtual CommandBufferNamespace GetNamespaceID() const = 0; |
| 96 virtual uint64_t GetCommandBufferID() const = 0; | 103 virtual uint64_t GetCommandBufferID() const = 0; |
| 97 virtual int32_t GetExtraCommandBufferData() const = 0; | 104 virtual int32_t GetExtraCommandBufferData() const = 0; |
| 98 | 105 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 118 // be enqueued first so does not need to be flushed. | 125 // be enqueued first so does not need to be flushed. |
| 119 virtual bool CanWaitUnverifiedSyncToken(const SyncToken* sync_token) = 0; | 126 virtual bool CanWaitUnverifiedSyncToken(const SyncToken* sync_token) = 0; |
| 120 | 127 |
| 121 private: | 128 private: |
| 122 DISALLOW_COPY_AND_ASSIGN(GpuControl); | 129 DISALLOW_COPY_AND_ASSIGN(GpuControl); |
| 123 }; | 130 }; |
| 124 | 131 |
| 125 } // namespace gpu | 132 } // namespace gpu |
| 126 | 133 |
| 127 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ | 134 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ |
| OLD | NEW |