| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2009, Google Inc. | 2 * Copyright 2009, Google Inc. |
| 3 * All rights reserved. | 3 * All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 30 */ | 30 */ |
| 31 | 31 |
| 32 | 32 |
| 33 // This file contains the command parser class. | 33 // This file contains the command parser class. |
| 34 | 34 |
| 35 #ifndef GPU_COMMAND_BUFFER_SERVICE_CROSS_CMD_PARSER_H_ | 35 #ifndef GPU_COMMAND_BUFFER_SERVICE_CMD_PARSER_H_ |
| 36 #define GPU_COMMAND_BUFFER_SERVICE_CROSS_CMD_PARSER_H_ | 36 #define GPU_COMMAND_BUFFER_SERVICE_CMD_PARSER_H_ |
| 37 | 37 |
| 38 #include "gpu/command_buffer/common/constants.h" | 38 #include "gpu/command_buffer/common/constants.h" |
| 39 #include "gpu/command_buffer/common/cmd_buffer_common.h" | 39 #include "gpu/command_buffer/common/cmd_buffer_common.h" |
| 40 | 40 |
| 41 namespace command_buffer { | 41 namespace gpu { |
| 42 | 42 |
| 43 class AsyncAPIInterface; | 43 class AsyncAPIInterface; |
| 44 | 44 |
| 45 // Command parser class. This class parses commands from a shared memory | 45 // Command parser class. This class parses commands from a shared memory |
| 46 // buffer, to implement some asynchronous RPC mechanism. | 46 // buffer, to implement some asynchronous RPC mechanism. |
| 47 class CommandParser { | 47 class CommandParser { |
| 48 public: | 48 public: |
| 49 CommandParser(void *shm_address, | 49 CommandParser(void *shm_address, |
| 50 size_t shm_size, | 50 size_t shm_size, |
| 51 ptrdiff_t offset, | 51 ptrdiff_t offset, |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 // parse_error::ParseError otherwise. | 103 // parse_error::ParseError otherwise. |
| 104 virtual parse_error::ParseError DoCommand( | 104 virtual parse_error::ParseError DoCommand( |
| 105 unsigned int command, | 105 unsigned int command, |
| 106 unsigned int arg_count, | 106 unsigned int arg_count, |
| 107 const void* cmd_data) = 0; | 107 const void* cmd_data) = 0; |
| 108 | 108 |
| 109 // Returns a name for a command. Useful for logging / debuging. | 109 // Returns a name for a command. Useful for logging / debuging. |
| 110 virtual const char* GetCommandName(unsigned int command_id) const = 0; | 110 virtual const char* GetCommandName(unsigned int command_id) const = 0; |
| 111 }; | 111 }; |
| 112 | 112 |
| 113 } // namespace command_buffer | 113 } // namespace gpu |
| 114 | 114 |
| 115 #endif // GPU_COMMAND_BUFFER_SERVICE_CROSS_CMD_PARSER_H_ | 115 #endif // GPU_COMMAND_BUFFER_SERVICE_CMD_PARSER_H_ |
| OLD | NEW |