Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Side by Side Diff: gpu/command_buffer/service/test_helper.h

Issue 2170293002: Use GLVersionInfo instead of gl::GetGLImplementation() to decide GL paths (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comment Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc ('k') | gpu/command_buffer/service/test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698