| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 virtual void RetireSyncPoint(uint32_t sync_point) = 0; | 68 virtual void RetireSyncPoint(uint32_t sync_point) = 0; |
| 69 | 69 |
| 70 // Runs |callback| when a sync point is reached. | 70 // Runs |callback| when a sync point is reached. |
| 71 virtual void SignalSyncPoint(uint32_t sync_point, | 71 virtual void SignalSyncPoint(uint32_t sync_point, |
| 72 const base::Closure& callback) = 0; | 72 const base::Closure& callback) = 0; |
| 73 | 73 |
| 74 // Runs |callback| when a query created via glCreateQueryEXT() has cleared | 74 // Runs |callback| when a query created via glCreateQueryEXT() has cleared |
| 75 // passed the glEndQueryEXT() point. | 75 // passed the glEndQueryEXT() point. |
| 76 virtual void SignalQuery(uint32_t query, const base::Closure& callback) = 0; | 76 virtual void SignalQuery(uint32_t query, const base::Closure& callback) = 0; |
| 77 | 77 |
| 78 virtual void SetSurfaceVisible(bool visible) = 0; | |
| 79 | |
| 80 // Sets a lock this will be held on every callback from the GPU | 78 // Sets a lock this will be held on every callback from the GPU |
| 81 // implementation. This lock must be set and must be held on every call into | 79 // implementation. This lock must be set and must be held on every call into |
| 82 // 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 |
| 83 // may not be supported with all implementations. | 81 // may not be supported with all implementations. |
| 84 virtual void SetLock(base::Lock*) = 0; | 82 virtual void SetLock(base::Lock*) = 0; |
| 85 | 83 |
| 86 // 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 |
| 87 // should be considered as lost. | 85 // should be considered as lost. |
| 88 virtual bool IsGpuChannelLost() = 0; | 86 virtual bool IsGpuChannelLost() = 0; |
| 89 | 87 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 115 // be enqueued first so does not need to be flushed. | 113 // be enqueued first so does not need to be flushed. |
| 116 virtual bool CanWaitUnverifiedSyncToken(const SyncToken* sync_token) = 0; | 114 virtual bool CanWaitUnverifiedSyncToken(const SyncToken* sync_token) = 0; |
| 117 | 115 |
| 118 private: | 116 private: |
| 119 DISALLOW_COPY_AND_ASSIGN(GpuControl); | 117 DISALLOW_COPY_AND_ASSIGN(GpuControl); |
| 120 }; | 118 }; |
| 121 | 119 |
| 122 } // namespace gpu | 120 } // namespace gpu |
| 123 | 121 |
| 124 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ | 122 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ |
| OLD | NEW |