cc: Added inline to Tile::IsReadyToDraw
[chromium-blink-merge.git] / gpu / command_buffer / common / command_buffer_mock.h
blob0e78b7b8c324fb95159d6f3a003df401aeacf064
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef GPU_COMMAND_BUFFER_COMMON_COMMAND_BUFFER_MOCK_H_
6 #define GPU_COMMAND_BUFFER_COMMON_COMMAND_BUFFER_MOCK_H_
8 #include "gpu/command_buffer/common/command_buffer.h"
9 #include "testing/gmock/include/gmock/gmock.h"
11 namespace base {
12 class SharedMemory;
15 namespace gpu {
17 // An NPObject that implements a shared memory command buffer and a synchronous
18 // API to manage the put and get pointers.
19 class MockCommandBuffer : public CommandBuffer {
20 public:
21 MockCommandBuffer();
22 virtual ~MockCommandBuffer();
24 MOCK_METHOD0(Initialize, bool());
25 MOCK_METHOD0(GetState, State());
26 MOCK_METHOD0(GetLastState, State());
27 MOCK_METHOD0(GetLastToken, int32());
28 MOCK_METHOD1(Flush, void(int32 put_offset));
29 MOCK_METHOD2(FlushSync, State(int32 put_offset, int32 last_known_get));
30 MOCK_METHOD1(SetGetBuffer, void(int32 transfer_buffer_id));
31 MOCK_METHOD1(SetGetOffset, void(int32 get_offset));
32 MOCK_METHOD2(CreateTransferBuffer, Buffer(size_t size, int32* id));
33 MOCK_METHOD1(DestroyTransferBuffer, void(int32 id));
34 MOCK_METHOD1(GetTransferBuffer, Buffer(int32 id));
35 MOCK_METHOD1(SetToken, void(int32 token));
36 MOCK_METHOD1(SetParseError, void(error::Error error));
37 MOCK_METHOD1(SetContextLostReason,
38 void(error::ContextLostReason context_lost_reason));
39 MOCK_METHOD0(InsertSyncPoint, uint32());
41 private:
42 DISALLOW_COPY_AND_ASSIGN(MockCommandBuffer);
45 } // namespace gpu
47 #endif // GPU_COMMAND_BUFFER_COMMON_COMMAND_BUFFER_MOCK_H_