Index: gpu/command_buffer/client/cmd_buffer_helper.cc |
diff --git a/gpu/command_buffer/client/cmd_buffer_helper.cc b/gpu/command_buffer/client/cmd_buffer_helper.cc |
index 11219ede664751e3fa92a2dcc800388f8d4d3f5c..85266990b49c290b34f7a6f3ba528bce835bcef8 100644 |
--- a/gpu/command_buffer/client/cmd_buffer_helper.cc |
+++ b/gpu/command_buffer/client/cmd_buffer_helper.cc |
@@ -169,6 +169,12 @@ int32 CommandBufferHelper::InsertToken() { |
return token_; |
} |
+bool CommandBufferHelper::HasTokenPassed(int32 token) { |
+ if (token > token_) |
+ return true; // we wrapped |
+ return last_token_read() >= token; |
+} |
+ |
// Waits until the current token value is greater or equal to the value passed |
// in argument. |
void CommandBufferHelper::WaitForToken(int32 token) { |