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

Unified Diff: gpu/command_buffer/client/cmd_buffer_helper.h

Issue 2509001: Refactor CommandBufferHelper to use Jump to loop... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 7 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
Index: gpu/command_buffer/client/cmd_buffer_helper.h
===================================================================
--- gpu/command_buffer/client/cmd_buffer_helper.h (revision 48721)
+++ gpu/command_buffer/client/cmd_buffer_helper.h (working copy)
@@ -202,7 +202,7 @@
// Returns the number of available entries (they may not be contiguous).
int32 AvailableEntries() {
- return (get_ - put_ - 1 + entry_count_) % entry_count_;
+ return (get_ - put_ - 1 + usable_entry_count_) % usable_entry_count_;
}
// Synchronize with current service state.
@@ -211,7 +211,8 @@
CommandBuffer* command_buffer_;
Buffer ring_buffer_;
CommandBufferEntry *entries_;
- int32 entry_count_;
+ int32 total_entry_count_; // the total number of entries
+ int32 usable_entry_count_; // the usable number (ie, minus space for jump)
int32 token_;
int32 last_token_read_;
int32 get_;
« no previous file with comments | « no previous file | gpu/command_buffer/client/cmd_buffer_helper.cc » ('j') | gpu/command_buffer/client/cmd_buffer_helper_test.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698