| 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 24 matching lines...) Expand all Loading... |
| 35 void WaitForGetOffsetInRange(int32 start, int32 end) override; | 35 void WaitForGetOffsetInRange(int32 start, int32 end) override; |
| 36 void SetGetBuffer(int transfer_buffer_id) override; | 36 void SetGetBuffer(int transfer_buffer_id) override; |
| 37 void SetGetOffset(int32 get_offset) override; | 37 void SetGetOffset(int32 get_offset) override; |
| 38 scoped_refptr<gpu::Buffer> CreateTransferBuffer(size_t size, | 38 scoped_refptr<gpu::Buffer> CreateTransferBuffer(size_t size, |
| 39 int32* id) override; | 39 int32* id) override; |
| 40 scoped_refptr<gpu::Buffer> GetTransferBuffer(int32 id) override; | 40 scoped_refptr<gpu::Buffer> GetTransferBuffer(int32 id) override; |
| 41 void SetToken(int32 token) override; | 41 void SetToken(int32 token) override; |
| 42 void SetParseError(error::Error error) override; | 42 void SetParseError(error::Error error) override; |
| 43 void SetContextLostReason(error::ContextLostReason reason) override; | 43 void SetContextLostReason(error::ContextLostReason reason) override; |
| 44 int32 GetPutOffset() override; | 44 int32 GetPutOffset() override; |
| 45 void GetRouteInformation(int* channel_id, uint32_t* route_id) override; |
| 45 | 46 |
| 46 // Get's the Id of the next transfer buffer that will be returned | 47 // Get's the Id of the next transfer buffer that will be returned |
| 47 // by CreateTransferBuffer. This is useful for testing expected ids. | 48 // by CreateTransferBuffer. This is useful for testing expected ids. |
| 48 int32 GetNextFreeTransferBufferId(); | 49 int32 GetNextFreeTransferBufferId(); |
| 49 | 50 |
| 50 void FlushHelper(int32 put_offset); | 51 void FlushHelper(int32 put_offset); |
| 51 void DestroyTransferBufferHelper(int32 id); | 52 void DestroyTransferBufferHelper(int32 id); |
| 52 | 53 |
| 53 virtual void OnFlush() = 0; | 54 virtual void OnFlush() = 0; |
| 54 | 55 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 MOCK_METHOD0(IsGpuChannelLost, bool()); | 115 MOCK_METHOD0(IsGpuChannelLost, bool()); |
| 115 | 116 |
| 116 private: | 117 private: |
| 117 DISALLOW_COPY_AND_ASSIGN(MockClientGpuControl); | 118 DISALLOW_COPY_AND_ASSIGN(MockClientGpuControl); |
| 118 }; | 119 }; |
| 119 | 120 |
| 120 } // namespace gpu | 121 } // namespace gpu |
| 121 | 122 |
| 122 #endif // GPU_COMMAND_BUFFER_CLIENT_CLIENT_TEST_HELPER_H_ | 123 #endif // GPU_COMMAND_BUFFER_CLIENT_CLIENT_TEST_HELPER_H_ |
| 123 | 124 |
| OLD | NEW |