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 #ifndef GPU_COMMAND_BUFFER_SERVICE_TEST_HELPER_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_TEST_HELPER_H_ |
6 #define GPU_COMMAND_BUFFER_SERVICE_TEST_HELPER_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_TEST_HELPER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 static void SetupTextureInitializationExpectations(::gl::MockGLInterface* gl, | 220 static void SetupTextureInitializationExpectations(::gl::MockGLInterface* gl, |
221 GLenum target, | 221 GLenum target, |
222 bool use_default_textures); | 222 bool use_default_textures); |
223 static void SetupTextureDestructionExpectations(::gl::MockGLInterface* gl, | 223 static void SetupTextureDestructionExpectations(::gl::MockGLInterface* gl, |
224 GLenum target, | 224 GLenum target, |
225 bool use_default_textures); | 225 bool use_default_textures); |
226 | 226 |
227 static std::vector<std::string> split_extensions_; | 227 static std::vector<std::string> split_extensions_; |
228 }; | 228 }; |
229 | 229 |
230 // This object temporaritly Sets what gl::GetGLImplementation returns. During | |
231 // testing the GLImplementation is set to kGLImplemenationMockGL but lots of | |
232 // code branches based on what gl::GetGLImplementation returns. | |
233 class ScopedGLImplementationSetter { | |
234 public: | |
235 explicit ScopedGLImplementationSetter(gl::GLImplementation implementation); | |
236 ~ScopedGLImplementationSetter(); | |
237 | |
238 private: | |
239 gl::GLImplementation old_implementation_; | |
240 }; | |
241 | |
242 } // namespace gles2 | 230 } // namespace gles2 |
243 } // namespace gpu | 231 } // namespace gpu |
244 | 232 |
245 #endif // GPU_COMMAND_BUFFER_SERVICE_TEST_HELPER_H_ | 233 #endif // GPU_COMMAND_BUFFER_SERVICE_TEST_HELPER_H_ |
246 | 234 |
OLD | NEW |