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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 // Sets a lock this will be held on every callback from the GPU | 82 // 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 | 83 // 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 | 84 // the GPU implementation if it is to be used from multiple threads. This |
85 // may not be supported with all implementations. | 85 // may not be supported with all implementations. |
86 virtual void SetLock(base::Lock*) = 0; | 86 virtual void SetLock(base::Lock*) = 0; |
87 | 87 |
| 88 // Returns true if the channel to the Gpu is lost. When true, all contexts |
| 89 // should be considered as lost. |
| 90 virtual bool IsGpuChannelLost() = 0; |
| 91 |
88 private: | 92 private: |
89 DISALLOW_COPY_AND_ASSIGN(GpuControl); | 93 DISALLOW_COPY_AND_ASSIGN(GpuControl); |
90 }; | 94 }; |
91 | 95 |
92 } // namespace gpu | 96 } // namespace gpu |
93 | 97 |
94 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ | 98 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_H_ |
OLD | NEW |