Chromium Code Reviews| Index: gpu/command_buffer/client/cmd_buffer_helper.h |
| diff --git a/gpu/command_buffer/client/cmd_buffer_helper.h b/gpu/command_buffer/client/cmd_buffer_helper.h |
| index 0c0edddfd7bab70bcf9d026f5db2f93f99593a23..4313d4d2c07740d8a8f467bb6b2948c24c48f873 100644 |
| --- a/gpu/command_buffer/client/cmd_buffer_helper.h |
| +++ b/gpu/command_buffer/client/cmd_buffer_helper.h |
| @@ -181,10 +181,6 @@ class GPU_EXPORT CommandBufferHelper |
| int32_t last_token_read() const { return command_buffer_->GetLastToken(); } |
| - int32_t get_offset() const { |
| - return command_buffer_->GetLastState().get_offset; |
| - } |
| - |
| // Common Commands |
| void Noop(uint32_t skip_count) { |
| cmd::Noop* cmd = GetImmediateCmdSpace<cmd::Noop>( |
| @@ -298,7 +294,7 @@ class GPU_EXPORT CommandBufferHelper |
| private: |
| // Returns the number of available entries (they may not be contiguous). |
| int32_t AvailableEntries() { |
| - return (get_offset() - put_ - 1 + total_entry_count_) % total_entry_count_; |
| + return (last_get_ - put_ - 1 + total_entry_count_) % total_entry_count_; |
| } |
| void CalcImmediateEntries(int waiting_count); |
| @@ -325,6 +321,7 @@ class GPU_EXPORT CommandBufferHelper |
| int32_t immediate_entry_count_; |
| int32_t token_; |
| int32_t put_; |
| + int32_t last_get_; |
|
sunnyps
2016/12/02 02:52:03
bikeshed: cached_get_offset_?
piman
2016/12/02 19:21:48
I like cached_get_offset_
sunnyps
2016/12/07 03:31:22
Done.
|
| int32_t last_put_sent_; |
| int32_t last_barrier_put_sent_; |