Index: gpu/command_buffer/service/cmd_parser.h |
diff --git a/gpu/command_buffer/service/cmd_parser.h b/gpu/command_buffer/service/cmd_parser.h |
index de2fe2977ff23a9d85fc432e7130c6159655c6bb..2030e8216810878fee996700740287d07ed8fe63 100644 |
--- a/gpu/command_buffer/service/cmd_parser.h |
+++ b/gpu/command_buffer/service/cmd_parser.h |
@@ -19,6 +19,8 @@ class AsyncAPIInterface; |
// buffer, to implement some asynchronous RPC mechanism. |
class GPU_EXPORT CommandParser { |
public: |
+ static const int kParseCommandsSlice = 20; |
+ |
explicit CommandParser(AsyncAPIInterface* handler); |
// Sets the buffer to read commands from. |
@@ -55,7 +57,7 @@ class GPU_EXPORT CommandParser { |
// Processes one command, updating the get pointer. This will return an error |
// if there are no commands in the buffer. |
- error::Error ProcessCommand(); |
+ error::Error ProcessCommands(int num_commands); |
// Processes all commands until get == put. |
error::Error ProcessAllCommands(); |
@@ -78,7 +80,7 @@ class AsyncAPIInterface { |
AsyncAPIInterface() {} |
virtual ~AsyncAPIInterface() {} |
- // Executes a command. |
+ // Executes a single command. |
// Parameters: |
// command: the command index. |
// arg_count: the number of CommandBufferEntry arguments. |
@@ -91,6 +93,14 @@ class AsyncAPIInterface { |
unsigned int arg_count, |
const void* cmd_data) = 0; |
+ // Executes multiple commands. |
+ // Parameters: |
+ // todo... |
+ virtual error::Error DoCommands(unsigned int num_commands, |
+ const void* buffer, |
+ int num_entries, |
+ int* entries_processed); |
+ |
// Returns a name for a command. Useful for logging / debuging. |
virtual const char* GetCommandName(unsigned int command_id) const = 0; |
}; |