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

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

Issue 7458010: Revert 93066 - Execute all GL commands up to the put offset reported by a each flush.This means g... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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 | « gpu/command_buffer/build_gles2_cmd_buffer.py ('k') | gpu/command_buffer/client/cmd_buffer_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/cmd_buffer_helper.h
===================================================================
--- gpu/command_buffer/client/cmd_buffer_helper.h (revision 93137)
+++ gpu/command_buffer/client/cmd_buffer_helper.h (working copy)
@@ -83,6 +83,11 @@
// the value of the token to wait for.
void WaitForToken(int32 token);
+ // Inserts a yield command, signaling the scheduler that this is a good point
+ // to update the state and schedule other command buffers. This is
+ // particularly useful after inserting a token that will be waited on.
+ void YieldScheduler();
+
// Called prior to each command being issued. Waits for a certain amount of
// space to be available. Returns address of space.
CommandBufferEntry* GetSpace(uint32 entries);
@@ -116,13 +121,9 @@
}
int32 last_token_read() const {
- return command_buffer_->GetLastState().token;
+ return last_token_read_;
}
- int32 get_offset() const {
- return command_buffer_->GetLastState().get_offset;
- }
-
error::Error GetError();
// Common Commands
@@ -220,16 +221,20 @@
// Returns the number of available entries (they may not be contiguous).
int32 AvailableEntries() {
- return (get_offset() - put_ - 1 + usable_entry_count_) %
- usable_entry_count_;
+ return (get_ - put_ - 1 + usable_entry_count_) % usable_entry_count_;
}
+ // Synchronize with current service state.
+ void SynchronizeState(const CommandBuffer::State& state);
+
CommandBuffer* command_buffer_;
Buffer ring_buffer_;
CommandBufferEntry *entries_;
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_;
int32 put_;
int32 last_put_sent_;
int commands_issued_;
« no previous file with comments | « gpu/command_buffer/build_gles2_cmd_buffer.py ('k') | gpu/command_buffer/client/cmd_buffer_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698