Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(886)

Unified Diff: command_buffer/service/cross/cmd_parser.cc

Issue 212018: Change command buffer client code to use structures.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « command_buffer/service/cross/cmd_parser.h ('k') | command_buffer/service/cross/cmd_parser_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: command_buffer/service/cross/cmd_parser.cc
===================================================================
--- command_buffer/service/cross/cmd_parser.cc (revision 26638)
+++ command_buffer/service/cross/cmd_parser.cc (working copy)
@@ -66,14 +66,14 @@
// - get_ is modified *after* the command has been executed.
BufferSyncInterface::ParseError CommandParser::ProcessCommand() {
CommandBufferOffset get = get_;
- if (get == put_) return BufferSyncInterface::PARSE_NO_ERROR;
+ if (get == put_) return BufferSyncInterface::kParseNoError;
CommandHeader header = buffer_[get].value_header;
- if (header.size == 0) return BufferSyncInterface::PARSE_INVALID_SIZE;
+ if (header.size == 0) return BufferSyncInterface::kParseInvalidSize;
if (header.size + get > entry_count_)
- return BufferSyncInterface::PARSE_OUT_OF_BOUNDS;
+ return BufferSyncInterface::kParseOutOfBounds;
BufferSyncInterface::ParseError result = handler_->DoCommand(
- header.command, header.size - 1, buffer_ + get + 1);
+ header.command, header.size - 1, buffer_ + get);
get_ = (get + header.size) % entry_count_;
return result;
}
@@ -85,7 +85,7 @@
BufferSyncInterface::ParseError error = ProcessCommand();
if (error) return error;
}
- return BufferSyncInterface::PARSE_NO_ERROR;
+ return BufferSyncInterface::kParseNoError;
}
} // namespace command_buffer
« no previous file with comments | « command_buffer/service/cross/cmd_parser.h ('k') | command_buffer/service/cross/cmd_parser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698