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 27 matching lines...) Expand all Loading... |
38 struct Mailbox; | 38 struct Mailbox; |
39 | 39 |
40 namespace gles2 { | 40 namespace gles2 { |
41 | 41 |
42 class ContextGroup; | 42 class ContextGroup; |
43 class ErrorState; | 43 class ErrorState; |
44 class GLES2Util; | 44 class GLES2Util; |
45 class ImageManager; | 45 class ImageManager; |
46 class Logger; | 46 class Logger; |
47 class QueryManager; | 47 class QueryManager; |
| 48 class ShaderTranslatorInterface; |
48 class Texture; | 49 class Texture; |
49 class TransformFeedbackManager; | 50 class TransformFeedbackManager; |
50 class VertexArrayManager; | 51 class VertexArrayManager; |
51 struct ContextCreationAttribHelper; | 52 struct ContextCreationAttribHelper; |
52 struct ContextState; | 53 struct ContextState; |
53 | 54 |
54 struct DisallowedFeatures { | 55 struct DisallowedFeatures { |
55 DisallowedFeatures() | 56 DisallowedFeatures() |
56 : gpu_memory_manager(false), | 57 : gpu_memory_manager(false), |
57 npot_support(false), | 58 npot_support(false), |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 | 321 |
321 // Lose this context. | 322 // Lose this context. |
322 virtual void MarkContextLost(error::ContextLostReason reason) = 0; | 323 virtual void MarkContextLost(error::ContextLostReason reason) = 0; |
323 | 324 |
324 virtual Logger* GetLogger() = 0; | 325 virtual Logger* GetLogger() = 0; |
325 | 326 |
326 virtual void BeginDecoding(); | 327 virtual void BeginDecoding(); |
327 virtual void EndDecoding(); | 328 virtual void EndDecoding(); |
328 | 329 |
329 virtual const ContextState* GetContextState() = 0; | 330 virtual const ContextState* GetContextState() = 0; |
| 331 virtual scoped_refptr<ShaderTranslatorInterface> GetTranslator( |
| 332 unsigned int type) = 0; |
330 | 333 |
331 protected: | 334 protected: |
332 GLES2Decoder(); | 335 GLES2Decoder(); |
333 | 336 |
334 // Decode a command, and call the corresponding GL functions. | 337 // Decode a command, and call the corresponding GL functions. |
335 // NOTE: DoCommand() is slower than calling DoCommands() on larger batches | 338 // NOTE: DoCommand() is slower than calling DoCommands() on larger batches |
336 // of commands at once, and is now only used for tests that need to track | 339 // of commands at once, and is now only used for tests that need to track |
337 // individual commands. | 340 // individual commands. |
338 error::Error DoCommand(unsigned int command, | 341 error::Error DoCommand(unsigned int command, |
339 unsigned int arg_count, | 342 unsigned int arg_count, |
340 const void* cmd_data) override; | 343 const void* cmd_data) override; |
341 | 344 |
342 private: | 345 private: |
343 bool initialized_; | 346 bool initialized_; |
344 bool debug_; | 347 bool debug_; |
345 bool log_commands_; | 348 bool log_commands_; |
346 bool unsafe_es3_apis_enabled_; | 349 bool unsafe_es3_apis_enabled_; |
347 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); | 350 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); |
348 }; | 351 }; |
349 | 352 |
350 } // namespace gles2 | 353 } // namespace gles2 |
351 } // namespace gpu | 354 } // namespace gpu |
352 | 355 |
353 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ | 356 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ |
OLD | NEW |