| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_CLIENT_H_ | 5 #ifndef GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_CLIENT_H_ |
| 6 #define GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_CLIENT_H_ | 6 #define GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_CLIENT_H_ |
| 7 | 7 |
| 8 #include <cstdint> | 8 #include <cstdint> |
| 9 | 9 |
| 10 namespace gpu { | 10 namespace gpu { |
| 11 | 11 |
| 12 class GpuControlClient { | 12 class GpuControlClient { |
| 13 public: | 13 public: |
| 14 // Informs the client that the context was lost. It should inform its own |
| 15 // clients or take actions as needed. This will only be called a single time |
| 16 // for any GpuControl. |
| 14 virtual void OnGpuControlLostContext() = 0; | 17 virtual void OnGpuControlLostContext() = 0; |
| 18 // This may happen inside calls from the client to the GpuControl, so this |
| 19 // function is reentrant. It informs the client of loss, but the client will |
| 20 // also receive a OnGpuControlLostContext (non-re-entrantly) in the future. |
| 21 // Use this only to update internal state if needed to make lost context be |
| 22 // visible immediately while unwinding the call stack. |
| 23 virtual void OnGpuControlLostContextMaybeReentrant() = 0; |
| 15 virtual void OnGpuControlErrorMessage(const char* message, int32_t id) = 0; | 24 virtual void OnGpuControlErrorMessage(const char* message, int32_t id) = 0; |
| 16 }; | 25 }; |
| 17 | 26 |
| 18 } // namespace gpu | 27 } // namespace gpu |
| 19 | 28 |
| 20 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_CLIENT_H_ | 29 #endif // GPU_COMMAND_BUFFER_CLIENT_GPU_CONTROL_CLIENT_H_ |
| OLD | NEW |