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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 // Returns true if the channel to the Gpu is lost. When true, all contexts | 89 // Returns true if the channel to the Gpu is lost. When true, all contexts |
90 // should be considered as lost. | 90 // should be considered as lost. |
91 virtual bool IsGpuChannelLost() = 0; | 91 virtual bool IsGpuChannelLost() = 0; |
92 | 92 |
93 // The namespace and command buffer ID forms a unique pair for all existing | 93 // The namespace and command buffer ID forms a unique pair for all existing |
94 // GpuControl (on client) and matches for the corresponding command buffer | 94 // GpuControl (on client) and matches for the corresponding command buffer |
95 // (on server) in a single server process. | 95 // (on server) in a single server process. |
96 virtual CommandBufferNamespace GetNamespaceID() const = 0; | 96 virtual CommandBufferNamespace GetNamespaceID() const = 0; |
97 virtual uint64_t GetCommandBufferID() const = 0; | 97 virtual uint64_t GetCommandBufferID() const = 0; |
98 | 98 |
| 99 // Fence Syncs use release counters at a context level, these fence syncs |
| 100 // need to be flushed before they can be shared with other contexts across |
| 101 // channels. Subclasses should implement these functions and take care of |
| 102 // figuring out when a fence sync has been flushed. |
| 103 virtual uint64_t GenerateFenceSyncRelease() = 0; |
| 104 virtual bool IsFenceSyncRelease(uint64_t release) = 0; |
| 105 virtual bool IsFenceSyncFlushed(uint64_t release) = 0; |
| 106 |
99 private: | 107 private: |
100 DISALLOW_COPY_AND_ASSIGN(GpuControl); | 108 DISALLOW_COPY_AND_ASSIGN(GpuControl); |
101 }; | 109 }; |
102 | 110 |
103 } // namespace gpu | 111 } // namespace gpu |
104 | 112 |
105 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ | 113 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ |
OLD | NEW |