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

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

Issue 6901138: Allow gpu ringbuffer to wrap around. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 8 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 | « no previous file | gpu/command_buffer/client/ring_buffer.cc » ('j') | gpu/command_buffer/client/ring_buffer.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/ring_buffer.h
diff --git a/gpu/command_buffer/client/ring_buffer.h b/gpu/command_buffer/client/ring_buffer.h
index b7194bb0cbae69ff94860ffddb0e86031b8bab9c..18ccf09f9bc873572bb59e19d8a014295b4deba0 100644
--- a/gpu/command_buffer/client/ring_buffer.h
+++ b/gpu/command_buffer/client/ring_buffer.h
@@ -61,18 +61,23 @@ class RingBuffer {
}
private:
+ enum State {
+ IN_USE,
+ PADDING,
+ FREE_PENDING_TOKEN
+ };
// Book-keeping sturcture that describes a block of memory.
struct Block {
- Block(Offset _offset, unsigned int _size)
+ Block(Offset _offset, unsigned int _size, State _state)
: offset(_offset),
size(_size),
token(0),
- valid(false) {
+ state(_state) {
}
Offset offset;
unsigned int size;
unsigned int token; // token to wait for.
- bool valid; // whether or not token has been set.
+ State state;
};
typedef std::deque<Block> Container;
« no previous file with comments | « no previous file | gpu/command_buffer/client/ring_buffer.cc » ('j') | gpu/command_buffer/client/ring_buffer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698