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 // This file contains the mock GLES2Decoder class. | 5 // This file contains the mock GLES2Decoder class. |
6 | 6 |
7 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_MOCK_H_ | 7 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_MOCK_H_ |
8 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_MOCK_H_ | 8 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_MOCK_H_ |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 const void* cmd_data)); | 95 const void* cmd_data)); |
96 MOCK_METHOD4(DoCommands, | 96 MOCK_METHOD4(DoCommands, |
97 error::Error(unsigned int num_commands, | 97 error::Error(unsigned int num_commands, |
98 const void* buffer, | 98 const void* buffer, |
99 int num_entries, | 99 int num_entries, |
100 int* entries_processed)); | 100 int* entries_processed)); |
101 MOCK_METHOD2(GetServiceTextureId, bool(uint32 client_texture_id, | 101 MOCK_METHOD2(GetServiceTextureId, bool(uint32 client_texture_id, |
102 uint32* service_texture_id)); | 102 uint32* service_texture_id)); |
103 MOCK_METHOD0(GetContextLostReason, error::ContextLostReason()); | 103 MOCK_METHOD0(GetContextLostReason, error::ContextLostReason()); |
104 MOCK_CONST_METHOD1(GetCommandName, const char*(unsigned int command_id)); | 104 MOCK_CONST_METHOD1(GetCommandName, const char*(unsigned int command_id)); |
105 MOCK_METHOD9(ClearLevel, bool( | 105 MOCK_METHOD9(ClearLevel, |
106 Texture* texture, | 106 bool(Texture* texture, |
107 unsigned target, | 107 unsigned target, |
108 int level, | 108 int level, |
109 unsigned internal_format, | 109 unsigned format, |
110 unsigned format, | 110 unsigned type, |
111 unsigned type, | 111 int x_offset, |
112 int width, | 112 int y_offset, |
113 int height, | 113 int width, |
114 bool is_texture_immutable)); | 114 int height)); |
115 MOCK_METHOD0(GetErrorState, ErrorState *()); | 115 MOCK_METHOD0(GetErrorState, ErrorState *()); |
116 | 116 |
117 MOCK_METHOD0(GetLogger, Logger*()); | 117 MOCK_METHOD0(GetLogger, Logger*()); |
118 MOCK_METHOD1(SetShaderCacheCallback, | 118 MOCK_METHOD1(SetShaderCacheCallback, |
119 void(const ShaderCacheCallback& callback)); | 119 void(const ShaderCacheCallback& callback)); |
120 MOCK_METHOD1(SetWaitSyncPointCallback, | 120 MOCK_METHOD1(SetWaitSyncPointCallback, |
121 void(const WaitSyncPointCallback& callback)); | 121 void(const WaitSyncPointCallback& callback)); |
122 MOCK_METHOD1(WaitForReadPixels, | 122 MOCK_METHOD1(WaitForReadPixels, |
123 void(base::Closure callback)); | 123 void(base::Closure callback)); |
124 MOCK_METHOD0(GetTextureUploadCount, uint32()); | 124 MOCK_METHOD0(GetTextureUploadCount, uint32()); |
125 MOCK_METHOD0(GetTotalTextureUploadTime, base::TimeDelta()); | 125 MOCK_METHOD0(GetTotalTextureUploadTime, base::TimeDelta()); |
126 MOCK_METHOD0(GetTotalProcessingCommandsTime, base::TimeDelta()); | 126 MOCK_METHOD0(GetTotalProcessingCommandsTime, base::TimeDelta()); |
127 MOCK_METHOD1(AddProcessingCommandsTime, void(base::TimeDelta)); | 127 MOCK_METHOD1(AddProcessingCommandsTime, void(base::TimeDelta)); |
128 MOCK_CONST_METHOD0(WasContextLost, bool()); | 128 MOCK_CONST_METHOD0(WasContextLost, bool()); |
129 MOCK_CONST_METHOD0(WasContextLostByRobustnessExtension, bool()); | 129 MOCK_CONST_METHOD0(WasContextLostByRobustnessExtension, bool()); |
130 MOCK_METHOD1(MarkContextLost, void(gpu::error::ContextLostReason reason)); | 130 MOCK_METHOD1(MarkContextLost, void(gpu::error::ContextLostReason reason)); |
131 | 131 |
132 DISALLOW_COPY_AND_ASSIGN(MockGLES2Decoder); | 132 DISALLOW_COPY_AND_ASSIGN(MockGLES2Decoder); |
133 }; | 133 }; |
134 | 134 |
135 } // namespace gles2 | 135 } // namespace gles2 |
136 } // namespace gpu | 136 } // namespace gpu |
137 | 137 |
138 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_MOCK_H_ | 138 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_MOCK_H_ |
OLD | NEW |