| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 // Runs |callback| when a query created via glCreateQueryEXT() has cleared | 62 // Runs |callback| when a query created via glCreateQueryEXT() has cleared |
| 63 // passed the glEndQueryEXT() point. | 63 // passed the glEndQueryEXT() point. |
| 64 virtual void SignalQuery(uint32_t query, const base::Closure& callback) = 0; | 64 virtual void SignalQuery(uint32_t query, const base::Closure& callback) = 0; |
| 65 | 65 |
| 66 // Sets a lock this will be held on every callback from the GPU | 66 // Sets a lock this will be held on every callback from the GPU |
| 67 // implementation. This lock must be set and must be held on every call into | 67 // implementation. This lock must be set and must be held on every call into |
| 68 // the GPU implementation if it is to be used from multiple threads. This | 68 // the GPU implementation if it is to be used from multiple threads. This |
| 69 // may not be supported with all implementations. | 69 // may not be supported with all implementations. |
| 70 virtual void SetLock(base::Lock*) = 0; | 70 virtual void SetLock(base::Lock*) = 0; |
| 71 | 71 |
| 72 // Returns true if the channel to the Gpu is lost. When true, all contexts |
| 73 // should be considered as lost. |
| 74 virtual bool IsGpuChannelLost() = 0; |
| 75 |
| 72 // When this function returns it ensures all previously flushed work is | 76 // When this function returns it ensures all previously flushed work is |
| 73 // visible by the service. This command does this by sending a synchronous | 77 // visible by the service. This command does this by sending a synchronous |
| 74 // IPC. Note just because the work is visible to the server does not mean | 78 // IPC. Note just because the work is visible to the server does not mean |
| 75 // that it has been processed. This is only relevant for out of process | 79 // that it has been processed. This is only relevant for out of process |
| 76 // services and will be treated as a NOP for in process command buffers. | 80 // services and will be treated as a NOP for in process command buffers. |
| 77 virtual void EnsureWorkVisible() = 0; | 81 virtual void EnsureWorkVisible() = 0; |
| 78 | 82 |
| 79 // The namespace and command buffer ID forms a unique pair for all existing | 83 // The namespace and command buffer ID forms a unique pair for all existing |
| 80 // GpuControl (on client) and matches for the corresponding command buffer | 84 // GpuControl (on client) and matches for the corresponding command buffer |
| 81 // (on server) in a single server process. The extra command buffer data can | 85 // (on server) in a single server process. The extra command buffer data can |
| (...skipping 26 matching lines...) Expand all Loading... |
| 108 // be enqueued first so does not need to be flushed. | 112 // be enqueued first so does not need to be flushed. |
| 109 virtual bool CanWaitUnverifiedSyncToken(const SyncToken* sync_token) = 0; | 113 virtual bool CanWaitUnverifiedSyncToken(const SyncToken* sync_token) = 0; |
| 110 | 114 |
| 111 private: | 115 private: |
| 112 DISALLOW_COPY_AND_ASSIGN(GpuControl); | 116 DISALLOW_COPY_AND_ASSIGN(GpuControl); |
| 113 }; | 117 }; |
| 114 | 118 |
| 115 } // namespace gpu | 119 } // namespace gpu |
| 116 | 120 |
| 117 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ | 121 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ |
| OLD | NEW |