commit | a24e75800dba32fbe8a44405dbc36a0e71708e90 | [log] [tgz] |
---|---|---|
author | [email protected] <[email protected]@0039d316-1c4b-4281-b951-d872f2087c98> | Wed Feb 15 23:21:32 2012 |
committer | [email protected] <[email protected]@0039d316-1c4b-4281-b951-d872f2087c98> | Wed Feb 15 23:21:32 2012 |
tree | 2d89538cde484fd0dea114f0dd26da75740c97a4 | |
parent | 7cb6beb8b3f8632ccdd771bc17d60d8b07dc54ed [diff] [blame] |
Don't call finish if there is nothing to do TEST=none BUG=25971 Review URL: http://codereview.chromium.org/9392025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122183 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/gpu/command_buffer/client/cmd_buffer_helper.cc b/gpu/command_buffer/client/cmd_buffer_helper.cc index d9a4c55e..29770b8 100644 --- a/gpu/command_buffer/client/cmd_buffer_helper.cc +++ b/gpu/command_buffer/client/cmd_buffer_helper.cc
@@ -115,6 +115,10 @@ if (!usable()) { return false; } + // If there is no work just exit. + if (put_ == get_offset()) { + return true; + } GPU_DCHECK(HaveRingBuffer()); do { // Do not loop forever if the flush fails, meaning the command buffer reader