OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // This file contains the GLES2Decoder class. | 5 // This file contains the GLES2Decoder class. |
6 | 6 |
7 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ | 7 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ |
8 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ | 8 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 virtual uint32 GetGLError() = 0; | 182 virtual uint32 GetGLError() = 0; |
183 | 183 |
184 // A callback for messages from the decoder. | 184 // A callback for messages from the decoder. |
185 virtual void SetMsgCallback(const MsgCallback& callback) = 0; | 185 virtual void SetMsgCallback(const MsgCallback& callback) = 0; |
186 | 186 |
187 virtual uint32 GetTextureUploadCount() = 0; | 187 virtual uint32 GetTextureUploadCount() = 0; |
188 virtual base::TimeDelta GetTotalTextureUploadTime() = 0; | 188 virtual base::TimeDelta GetTotalTextureUploadTime() = 0; |
189 virtual base::TimeDelta GetTotalProcessingCommandsTime() = 0; | 189 virtual base::TimeDelta GetTotalProcessingCommandsTime() = 0; |
190 virtual void AddProcessingCommandsTime(base::TimeDelta) = 0; | 190 virtual void AddProcessingCommandsTime(base::TimeDelta) = 0; |
191 | 191 |
| 192 // Returns true if the context was just lost due to e.g. GL_ARB_robustness. |
192 virtual bool WasContextLost() = 0; | 193 virtual bool WasContextLost() = 0; |
193 | 194 |
| 195 // Lose this context. |
| 196 virtual void LoseContext(uint32 reset_status) = 0; |
| 197 |
194 static bool IsAngle(); | 198 static bool IsAngle(); |
195 | 199 |
196 // Used for testing only | 200 // Used for testing only |
197 static void set_testing_force_is_angle(bool force); | 201 static void set_testing_force_is_angle(bool force); |
198 | 202 |
199 protected: | 203 protected: |
200 GLES2Decoder(); | 204 GLES2Decoder(); |
201 | 205 |
202 private: | 206 private: |
203 bool debug_; | 207 bool debug_; |
204 bool log_commands_; | 208 bool log_commands_; |
205 bool log_synthesized_gl_errors_; | 209 bool log_synthesized_gl_errors_; |
206 static bool testing_force_is_angle_; | 210 static bool testing_force_is_angle_; |
207 | 211 |
208 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); | 212 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); |
209 }; | 213 }; |
210 | 214 |
211 } // namespace gles2 | 215 } // namespace gles2 |
212 } // namespace gpu | 216 } // namespace gpu |
213 | 217 |
214 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ | 218 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ |
OLD | NEW |