| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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; | 78 virtual void SetSurfaceVisible(bool visible) = 0; |
| 79 | 79 |
| 80 // Attaches an external stream to the texture given by |texture_id| and | |
| 81 // returns a stream identifier. | |
| 82 virtual uint32_t CreateStreamTexture(uint32_t texture_id) = 0; | |
| 83 | |
| 84 // Sets a lock this will be held on every callback from the GPU | 80 // Sets a lock this will be held on every callback from the GPU |
| 85 // implementation. This lock must be set and must be held on every call into | 81 // implementation. This lock must be set and must be held on every call into |
| 86 // the GPU implementation if it is to be used from multiple threads. This | 82 // the GPU implementation if it is to be used from multiple threads. This |
| 87 // may not be supported with all implementations. | 83 // may not be supported with all implementations. |
| 88 virtual void SetLock(base::Lock*) = 0; | 84 virtual void SetLock(base::Lock*) = 0; |
| 89 | 85 |
| 90 // Returns true if the channel to the Gpu is lost. When true, all contexts | 86 // Returns true if the channel to the Gpu is lost. When true, all contexts |
| 91 // should be considered as lost. | 87 // should be considered as lost. |
| 92 virtual bool IsGpuChannelLost() = 0; | 88 virtual bool IsGpuChannelLost() = 0; |
| 93 | 89 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 119 // be enqueued first so does not need to be flushed. | 115 // be enqueued first so does not need to be flushed. |
| 120 virtual bool CanWaitUnverifiedSyncToken(const SyncToken* sync_token) = 0; | 116 virtual bool CanWaitUnverifiedSyncToken(const SyncToken* sync_token) = 0; |
| 121 | 117 |
| 122 private: | 118 private: |
| 123 DISALLOW_COPY_AND_ASSIGN(GpuControl); | 119 DISALLOW_COPY_AND_ASSIGN(GpuControl); |
| 124 }; | 120 }; |
| 125 | 121 |
| 126 } // namespace gpu | 122 } // namespace gpu |
| 127 | 123 |
| 128 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ | 124 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ |
| OLD | NEW |