| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 81 |
| 82 void DelegateToFake(); | 82 void DelegateToFake(); |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 class MockClientGpuControl : public GpuControl { | 85 class MockClientGpuControl : public GpuControl { |
| 86 public: | 86 public: |
| 87 MockClientGpuControl(); | 87 MockClientGpuControl(); |
| 88 virtual ~MockClientGpuControl(); | 88 virtual ~MockClientGpuControl(); |
| 89 | 89 |
| 90 MOCK_METHOD0(GetCapabilities, Capabilities()); | 90 MOCK_METHOD0(GetCapabilities, Capabilities()); |
| 91 MOCK_METHOD5(CreateGpuMemoryBuffer, | 91 MOCK_METHOD4(CreateImage, |
| 92 gfx::GpuMemoryBuffer*(size_t width, | 92 int32(ClientBuffer buffer, |
| 93 size_t height, | 93 size_t width, |
| 94 unsigned internalformat, | 94 size_t height, |
| 95 unsigned usage, | 95 unsigned internalformat)); |
| 96 int32* id)); | 96 MOCK_METHOD1(DestroyImage, void(int32 id)); |
| 97 MOCK_METHOD1(DestroyGpuMemoryBuffer, void(int32 id)); | 97 MOCK_METHOD4(CreateGpuMemoryBufferImage, |
| 98 int32(size_t width, |
| 99 size_t height, |
| 100 unsigned internalformat, |
| 101 unsigned usage)); |
| 98 MOCK_METHOD0(InsertSyncPoint, uint32()); | 102 MOCK_METHOD0(InsertSyncPoint, uint32()); |
| 99 MOCK_METHOD0(InsertFutureSyncPoint, uint32()); | 103 MOCK_METHOD0(InsertFutureSyncPoint, uint32()); |
| 100 MOCK_METHOD1(RetireSyncPoint, void(uint32 id)); | 104 MOCK_METHOD1(RetireSyncPoint, void(uint32 id)); |
| 101 MOCK_METHOD2(SignalSyncPoint, void(uint32 id, const base::Closure& callback)); | 105 MOCK_METHOD2(SignalSyncPoint, void(uint32 id, const base::Closure& callback)); |
| 102 MOCK_METHOD2(SignalQuery, void(uint32 query, const base::Closure& callback)); | 106 MOCK_METHOD2(SignalQuery, void(uint32 query, const base::Closure& callback)); |
| 103 MOCK_METHOD1(SetSurfaceVisible, void(bool visible)); | 107 MOCK_METHOD1(SetSurfaceVisible, void(bool visible)); |
| 104 MOCK_METHOD1(CreateStreamTexture, uint32(uint32)); | 108 MOCK_METHOD1(CreateStreamTexture, uint32(uint32)); |
| 105 | 109 |
| 106 private: | 110 private: |
| 107 DISALLOW_COPY_AND_ASSIGN(MockClientGpuControl); | 111 DISALLOW_COPY_AND_ASSIGN(MockClientGpuControl); |
| 108 }; | 112 }; |
| 109 | 113 |
| 110 } // namespace gpu | 114 } // namespace gpu |
| 111 | 115 |
| 112 #endif // GPU_COMMAND_BUFFER_CLIENT_CLIENT_TEST_HELPER_H_ | 116 #endif // GPU_COMMAND_BUFFER_CLIENT_CLIENT_TEST_HELPER_H_ |
| 113 | 117 |
| OLD | NEW |