diff options
author | gman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-03 16:15:47 +0000 |
---|---|---|
committer | gman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-03 16:15:47 +0000 |
commit | 9310b2601bf040a5da92b6183c493ab0746bcd09 (patch) | |
tree | f554ef8c4a23bc15debbfbd9a65f7db73cf3fbc2 /gpu/command_buffer/service/cmd_parser.cc | |
parent | 74ed092bdb8856b20352d2275d4aa0913b0a4cac (diff) | |
download | chromium_src-9310b2601bf040a5da92b6183c493ab0746bcd09.zip chromium_src-9310b2601bf040a5da92b6183c493ab0746bcd09.tar.gz chromium_src-9310b2601bf040a5da92b6183c493ab0746bcd09.tar.bz2 |
Refactor CommandBufferHelper to use Jump to loop
instead of Noop. This makes it actually work if you
tell the command buffer helper to use less than
the entire command buffer.
TEST=modified unit tests and ran GLES2 conformance tests.
BUG=NONE
Review URL: http://codereview.chromium.org/2509001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48835 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer/service/cmd_parser.cc')
-rw-r--r-- | gpu/command_buffer/service/cmd_parser.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gpu/command_buffer/service/cmd_parser.cc b/gpu/command_buffer/service/cmd_parser.cc index 191ddfa..a4b4755 100644 --- a/gpu/command_buffer/service/cmd_parser.cc +++ b/gpu/command_buffer/service/cmd_parser.cc @@ -58,7 +58,11 @@ error::Error CommandParser::ProcessCommand() { if (result != error::kNoError) { ReportError(header.command, result); } - get_ = (get + header.size) % entry_count_; + + // If get was not set somewhere else advance it. + if (get == get_) { + get_ = (get + header.size) % entry_count_; + } return result; } |