diff options
Diffstat (limited to 'gpu/command_buffer/client/ring_buffer.cc')
-rw-r--r-- | gpu/command_buffer/client/ring_buffer.cc | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/gpu/command_buffer/client/ring_buffer.cc b/gpu/command_buffer/client/ring_buffer.cc index 42e09bd..46a86a2 100644 --- a/gpu/command_buffer/client/ring_buffer.cc +++ b/gpu/command_buffer/client/ring_buffer.cc @@ -94,12 +94,8 @@ void RingBuffer::FreePendingToken(RingBuffer::Offset offset, } unsigned int RingBuffer::GetLargestFreeSizeNoWaiting() { - unsigned int last_token_read = helper_->last_token_read(); - while (!blocks_.empty()) { - Block& block = blocks_.front(); - if (block.token > last_token_read || block.state == IN_USE) break; - FreeOldestBlock(); - } + // TODO(gman): Should check what the current token is and free up to that + // point. if (free_offset_ == in_use_offset_) { if (blocks_.empty()) { // The entire buffer is free. |