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

Unified Diff: gpu/command_buffer/common/command_buffer.h

Issue 6316002: Make CommandBuffer::Flush asynchronous, and add CommandBuffer::FlushSync with former semantics. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 11 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/common/command_buffer.h
diff --git a/gpu/command_buffer/common/command_buffer.h b/gpu/command_buffer/common/command_buffer.h
index 41eda77f81dc7548e5e80ff1a3d1496139d8f117..963b2289639eac6a0ec7080eba6c08069e6b443b 100644
--- a/gpu/command_buffer/common/command_buffer.h
+++ b/gpu/command_buffer/common/command_buffer.h
@@ -61,10 +61,17 @@ class CommandBuffer {
// Returns the current status.
virtual State GetState() = 0;
+ // The writer calls this to update its put offset. This ensures the reader
+ // sees the latest added commands, and will eventually process them.
+ virtual void Flush(int32 put_offset) = 0;
+
// The writer calls this to update its put offset. This function returns the
// reader's most recent get offset. Does not return until after the put offset
// change callback has been invoked. Returns -1 if the put offset is invalid.
- virtual State Flush(int32 put_offset) = 0;
+ // As opposed to Flush(), this function guarantees that the reader has
+ // processed some commands before returning (assuming the command buffer isn't
+ // empty and there is no error).
+ virtual State FlushSync(int32 put_offset) = 0;
// Sets the current get offset. This can be called from any thread.
virtual void SetGetOffset(int32 get_offset) = 0;
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation_unittest.cc ('k') | gpu/command_buffer/common/command_buffer_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698