| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 | 80 // Attaches an external stream to the texture given by |texture_id| and |
| 81 // returns a stream identifier. | 81 // returns a stream identifier. |
| 82 virtual uint32_t CreateStreamTexture(uint32_t texture_id) = 0; | 82 virtual int32 CreateStreamTexture(uint32_t texture_id) = 0; |
| 83 |
| 84 // Set the size to the external stream texture. |
| 85 virtual void SetStreamTextureSize(uint32 texture_id, |
| 86 int32 stream_id, |
| 87 size_t width, |
| 88 size_t height) = 0; |
| 83 | 89 |
| 84 // Sets a lock this will be held on every callback from the GPU | 90 // 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 | 91 // 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 | 92 // the GPU implementation if it is to be used from multiple threads. This |
| 87 // may not be supported with all implementations. | 93 // may not be supported with all implementations. |
| 88 virtual void SetLock(base::Lock*) = 0; | 94 virtual void SetLock(base::Lock*) = 0; |
| 89 | 95 |
| 90 // Returns true if the channel to the Gpu is lost. When true, all contexts | 96 // Returns true if the channel to the Gpu is lost. When true, all contexts |
| 91 // should be considered as lost. | 97 // should be considered as lost. |
| 92 virtual bool IsGpuChannelLost() = 0; | 98 virtual bool IsGpuChannelLost() = 0; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 119 // be enqueued first so does not need to be flushed. | 125 // be enqueued first so does not need to be flushed. |
| 120 virtual bool CanWaitUnverifiedSyncToken(const SyncToken* sync_token) = 0; | 126 virtual bool CanWaitUnverifiedSyncToken(const SyncToken* sync_token) = 0; |
| 121 | 127 |
| 122 private: | 128 private: |
| 123 DISALLOW_COPY_AND_ASSIGN(GpuControl); | 129 DISALLOW_COPY_AND_ASSIGN(GpuControl); |
| 124 }; | 130 }; |
| 125 | 131 |
| 126 } // namespace gpu | 132 } // namespace gpu |
| 127 | 133 |
| 128 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ | 134 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ |
| OLD | NEW |