| Index: gpu/command_buffer/client/client_test_helper.cc
|
| diff --git a/gpu/command_buffer/client/client_test_helper.cc b/gpu/command_buffer/client/client_test_helper.cc
|
| index e6ddfadde80b75179083f02880ad12f0564b3508..d9942ef4347d4ec07289c0c755868dfa765f354f 100644
|
| --- a/gpu/command_buffer/client/client_test_helper.cc
|
| +++ b/gpu/command_buffer/client/client_test_helper.cc
|
| @@ -30,10 +30,6 @@ CommandBuffer::State MockCommandBufferBase::GetLastState() {
|
| return state_;
|
| }
|
|
|
| -void MockCommandBufferBase::Flush(int32 put_offset) {
|
| - state_.put_offset = put_offset;
|
| -}
|
| -
|
| void MockCommandBufferBase::SetGetOffset(int32 get_offset) {
|
| state_.get_offset = get_offset;
|
| }
|
| @@ -98,6 +94,10 @@ int32 MockCommandBufferBase::RegisterTransferBuffer(
|
| return -1;
|
| }
|
|
|
| +void MockCommandBufferBase::FlushHelper(int32 put_offset) {
|
| + state_.put_offset = put_offset;
|
| +}
|
| +
|
| void MockCommandBufferBase::SetToken(int32 token) {
|
| GPU_NOTREACHED();
|
| state_.token = token;
|
| @@ -127,12 +127,30 @@ MockClientCommandBuffer::MockClientCommandBuffer() {
|
| MockClientCommandBuffer::~MockClientCommandBuffer() {
|
| }
|
|
|
| +void MockClientCommandBuffer::Flush(int32 put_offset) {
|
| + FlushHelper(put_offset);
|
| +}
|
| +
|
| void MockClientCommandBuffer::DelegateToFake() {
|
| ON_CALL(*this, DestroyTransferBuffer(_))
|
| .WillByDefault(Invoke(
|
| this, &MockCommandBufferBase::DestroyTransferBufferHelper));
|
| }
|
|
|
| +MockClientCommandBufferMockFlush::MockClientCommandBufferMockFlush() {
|
| + DelegateToFake();
|
| +}
|
| +
|
| +MockClientCommandBufferMockFlush::~MockClientCommandBufferMockFlush() {
|
| +}
|
| +
|
| +void MockClientCommandBufferMockFlush::DelegateToFake() {
|
| + MockClientCommandBuffer::DelegateToFake();
|
| + ON_CALL(*this, Flush(_))
|
| + .WillByDefault(Invoke(
|
| + this, &MockCommandBufferBase::FlushHelper));
|
| +}
|
| +
|
| } // namespace gpu
|
|
|
|
|
|
|