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 a99201e4b36164ef01ef218d7651f6fe55e851b9..038ba41fda06ae7b10e2d73b91e9423d2b1d8410 100644 |
--- a/gpu/command_buffer/client/cmd_buffer_helper.cc |
+++ b/gpu/command_buffer/client/cmd_buffer_helper.cc |
@@ -150,7 +150,7 @@ void CommandBufferHelper::Flush() { |
if (put_ == total_entry_count_) |
put_ = 0; |
- if (usable() && last_put_sent_ != put_) { |
+ if (usable()) { |
last_flush_time_ = base::TimeTicks::Now(); |
last_put_sent_ = put_; |
command_buffer_->Flush(put_); |
@@ -159,6 +159,18 @@ void CommandBufferHelper::Flush() { |
} |
} |
+void CommandBufferHelper::OrderingBarrier() { |
+ // Wrap put_ before setting the barrier. |
+ if (put_ == total_entry_count_) |
+ put_ = 0; |
+ |
+ if (usable()) { |
+ command_buffer_->OrderingBarrier(put_); |
+ ++flush_generation_; |
+ CalcImmediateEntries(0); |
+ } |
+} |
+ |
#if defined(CMD_HELPER_PERIODIC_FLUSH_CHECK) |
void CommandBufferHelper::PeriodicFlushCheck() { |
base::TimeTicks current_time = base::TimeTicks::Now(); |