| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Helper classes for implementing gpu client side unit tests. | 5 // Helper classes for implementing gpu client side unit tests. |
| 6 | 6 |
| 7 #ifndef GPU_COMMAND_BUFFER_CLIENT_CLIENT_TEST_HELPER_H_ | 7 #ifndef GPU_COMMAND_BUFFER_CLIENT_CLIENT_TEST_HELPER_H_ |
| 8 #define GPU_COMMAND_BUFFER_CLIENT_CLIENT_TEST_HELPER_H_ | 8 #define GPU_COMMAND_BUFFER_CLIENT_CLIENT_TEST_HELPER_H_ |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 class MockClientCommandBuffer : public MockCommandBufferBase { | 63 class MockClientCommandBuffer : public MockCommandBufferBase { |
| 64 public: | 64 public: |
| 65 MockClientCommandBuffer(); | 65 MockClientCommandBuffer(); |
| 66 virtual ~MockClientCommandBuffer(); | 66 virtual ~MockClientCommandBuffer(); |
| 67 | 67 |
| 68 // This is so we can use all the gmock functions when Flush is called. | 68 // This is so we can use all the gmock functions when Flush is called. |
| 69 MOCK_METHOD0(OnFlush, void()); | 69 MOCK_METHOD0(OnFlush, void()); |
| 70 MOCK_METHOD1(DestroyTransferBuffer, void(int32 id)); | 70 MOCK_METHOD1(DestroyTransferBuffer, void(int32 id)); |
| 71 | 71 |
| 72 virtual void Flush(int32 put_offset) override; | 72 virtual void Flush(int32 put_offset) override; |
| 73 virtual void OrderingBarrier(int32 put_offset) override; |
| 73 | 74 |
| 74 void DelegateToFake(); | 75 void DelegateToFake(); |
| 75 }; | 76 }; |
| 76 | 77 |
| 77 class MockClientCommandBufferMockFlush : public MockClientCommandBuffer { | 78 class MockClientCommandBufferMockFlush : public MockClientCommandBuffer { |
| 78 public: | 79 public: |
| 79 MockClientCommandBufferMockFlush(); | 80 MockClientCommandBufferMockFlush(); |
| 80 virtual ~MockClientCommandBufferMockFlush(); | 81 virtual ~MockClientCommandBufferMockFlush(); |
| 81 | 82 |
| 82 MOCK_METHOD1(Flush, void(int32 put_offset)); | 83 MOCK_METHOD1(Flush, void(int32 put_offset)); |
| 84 MOCK_METHOD1(OrderingBarrier, void(int32 put_offset)); |
| 83 | 85 |
| 84 void DelegateToFake(); | 86 void DelegateToFake(); |
| 85 }; | 87 }; |
| 86 | 88 |
| 87 class MockClientGpuControl : public GpuControl { | 89 class MockClientGpuControl : public GpuControl { |
| 88 public: | 90 public: |
| 89 MockClientGpuControl(); | 91 MockClientGpuControl(); |
| 90 virtual ~MockClientGpuControl(); | 92 virtual ~MockClientGpuControl(); |
| 91 | 93 |
| 92 MOCK_METHOD0(GetCapabilities, Capabilities()); | 94 MOCK_METHOD0(GetCapabilities, Capabilities()); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 110 MOCK_METHOD1(CreateStreamTexture, uint32(uint32)); | 112 MOCK_METHOD1(CreateStreamTexture, uint32(uint32)); |
| 111 | 113 |
| 112 private: | 114 private: |
| 113 DISALLOW_COPY_AND_ASSIGN(MockClientGpuControl); | 115 DISALLOW_COPY_AND_ASSIGN(MockClientGpuControl); |
| 114 }; | 116 }; |
| 115 | 117 |
| 116 } // namespace gpu | 118 } // namespace gpu |
| 117 | 119 |
| 118 #endif // GPU_COMMAND_BUFFER_CLIENT_CLIENT_TEST_HELPER_H_ | 120 #endif // GPU_COMMAND_BUFFER_CLIENT_CLIENT_TEST_HELPER_H_ |
| 119 | 121 |
| OLD | NEW |