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

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

Issue 116863003: gpu: Reuse transfer buffers more aggresively (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: [WIP] Introduced internal SetAsyncToken command buffer command Created 6 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 394ccf3c4f7475703e6c9bb1486f308f0b06f45a..3a7801077f32a335fe50584cb60eecf9d7e6656a 100644
--- a/gpu/command_buffer/common/command_buffer.h
+++ b/gpu/command_buffer/common/command_buffer.h
@@ -24,6 +24,7 @@ class GPU_EXPORT CommandBuffer {
get_offset(0),
put_offset(0),
token(-1),
+ async_token(0),
error(error::kNoError),
context_lost_reason(error::kUnknown),
generation(0) {
@@ -45,6 +46,11 @@ class GPU_EXPORT CommandBuffer {
// embedded in the command buffer. The default token value is zero.
int32 token;
+ // The current async token. This used by the reader to synchronize with the
+ // writer that the action associated with the async token has been
+ // completed.
+ uint32 async_token;
reveman 2014/01/22 17:30:04 is there a good reason this is unsigned but |token
+
// Error status.
error::Error error;
@@ -118,6 +124,9 @@ class GPU_EXPORT CommandBuffer {
// Allows the reader to update the current token value.
virtual void SetToken(int32 token) = 0;
+ // Allows the reader to update the current async token value.
+ virtual void SetAsyncToken(uint32 token) = 0;
+
// Allows the reader to set the current parse error.
virtual void SetParseError(error::Error) = 0;

Powered by Google App Engine
This is Rietveld 408576698