| 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 // Runs |callback| when a query created via glCreateQueryEXT() has cleared | 72 // Runs |callback| when a query created via glCreateQueryEXT() has cleared |
| 73 // passed the glEndQueryEXT() point. | 73 // passed the glEndQueryEXT() point. |
| 74 virtual void SignalQuery(uint32_t query, const base::Closure& callback) = 0; | 74 virtual void SignalQuery(uint32_t query, const base::Closure& callback) = 0; |
| 75 | 75 |
| 76 virtual void SetSurfaceVisible(bool visible) = 0; | 76 virtual void SetSurfaceVisible(bool visible) = 0; |
| 77 | 77 |
| 78 // Attaches an external stream to the texture given by |texture_id| and | 78 // Attaches an external stream to the texture given by |texture_id| and |
| 79 // returns a stream identifier. | 79 // returns a stream identifier. |
| 80 virtual uint32_t CreateStreamTexture(uint32_t texture_id) = 0; | 80 virtual uint32_t CreateStreamTexture(uint32_t texture_id) = 0; |
| 81 | 81 |
| 82 virtual uint32_t CreateStreamTextureImage(int32_t image_id) = 0; |
| 83 |
| 82 // Sets a lock this will be held on every callback from the GPU | 84 // Sets a lock this will be held on every callback from the GPU |
| 83 // implementation. This lock must be set and must be held on every call into | 85 // implementation. This lock must be set and must be held on every call into |
| 84 // the GPU implementation if it is to be used from multiple threads. This | 86 // the GPU implementation if it is to be used from multiple threads. This |
| 85 // may not be supported with all implementations. | 87 // may not be supported with all implementations. |
| 86 virtual void SetLock(base::Lock*) = 0; | 88 virtual void SetLock(base::Lock*) = 0; |
| 87 | 89 |
| 88 // Returns true if the channel to the Gpu is lost. When true, all contexts | 90 // Returns true if the channel to the Gpu is lost. When true, all contexts |
| 89 // should be considered as lost. | 91 // should be considered as lost. |
| 90 virtual bool IsGpuChannelLost() = 0; | 92 virtual bool IsGpuChannelLost() = 0; |
| 91 | 93 |
| 92 private: | 94 private: |
| 93 DISALLOW_COPY_AND_ASSIGN(GpuControl); | 95 DISALLOW_COPY_AND_ASSIGN(GpuControl); |
| 94 }; | 96 }; |
| 95 | 97 |
| 96 } // namespace gpu | 98 } // namespace gpu |
| 97 | 99 |
| 98 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ | 100 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ |
| OLD | NEW |