| 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 <stdint.h> | 10 #include <stdint.h> |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 // Lose this context. | 309 // Lose this context. |
| 310 virtual void MarkContextLost(error::ContextLostReason reason) = 0; | 310 virtual void MarkContextLost(error::ContextLostReason reason) = 0; |
| 311 | 311 |
| 312 virtual Logger* GetLogger() = 0; | 312 virtual Logger* GetLogger() = 0; |
| 313 | 313 |
| 314 virtual void BeginDecoding(); | 314 virtual void BeginDecoding(); |
| 315 virtual void EndDecoding(); | 315 virtual void EndDecoding(); |
| 316 | 316 |
| 317 virtual const ContextState* GetContextState() = 0; | 317 virtual const ContextState* GetContextState() = 0; |
| 318 virtual scoped_refptr<ShaderTranslatorInterface> GetTranslator( | 318 virtual scoped_refptr<ShaderTranslatorInterface> GetTranslator( |
| 319 unsigned int type) = 0; | 319 unsigned int type) const = 0; |
| 320 | 320 |
| 321 protected: | 321 protected: |
| 322 GLES2Decoder(); | 322 GLES2Decoder(); |
| 323 | 323 |
| 324 // Decode a command, and call the corresponding GL functions. | 324 // Decode a command, and call the corresponding GL functions. |
| 325 // NOTE: DoCommand() is slower than calling DoCommands() on larger batches | 325 // NOTE: DoCommand() is slower than calling DoCommands() on larger batches |
| 326 // of commands at once, and is now only used for tests that need to track | 326 // of commands at once, and is now only used for tests that need to track |
| 327 // individual commands. | 327 // individual commands. |
| 328 error::Error DoCommand(unsigned int command, | 328 error::Error DoCommand(unsigned int command, |
| 329 unsigned int arg_count, | 329 unsigned int arg_count, |
| 330 const volatile void* cmd_data) override; | 330 const volatile void* cmd_data) override; |
| 331 | 331 |
| 332 private: | 332 private: |
| 333 bool initialized_; | 333 bool initialized_; |
| 334 bool debug_; | 334 bool debug_; |
| 335 bool log_commands_; | 335 bool log_commands_; |
| 336 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); | 336 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); |
| 337 }; | 337 }; |
| 338 | 338 |
| 339 } // namespace gles2 | 339 } // namespace gles2 |
| 340 } // namespace gpu | 340 } // namespace gpu |
| 341 | 341 |
| 342 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ | 342 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ |
| OLD | NEW |