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 #include <vector> | 5 #include <vector> |
6 | 6 |
7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 DVLOG(1) << "Failed to load " << filename.MaybeAsASCII() << ": " << error; | 38 DVLOG(1) << "Failed to load " << filename.MaybeAsASCII() << ": " << error; |
39 return NULL; | 39 return NULL; |
40 } | 40 } |
41 return library; | 41 return library; |
42 } | 42 } |
43 | 43 |
44 base::NativeLibrary LoadLibrary(const char* filename) { | 44 base::NativeLibrary LoadLibrary(const char* filename) { |
45 return LoadLibrary(FilePath(filename)); | 45 return LoadLibrary(FilePath(filename)); |
46 } | 46 } |
47 | 47 |
48 } // namespace anonymous | 48 } // namespace |
49 | 49 |
50 void GetAllowedGLImplementations(std::vector<GLImplementation>* impls) { | 50 void GetAllowedGLImplementations(std::vector<GLImplementation>* impls) { |
51 impls->push_back(kGLImplementationDesktopGL); | 51 impls->push_back(kGLImplementationDesktopGL); |
52 impls->push_back(kGLImplementationEGLGLES2); | 52 impls->push_back(kGLImplementationEGLGLES2); |
53 impls->push_back(kGLImplementationOSMesaGL); | 53 impls->push_back(kGLImplementationOSMesaGL); |
54 } | 54 } |
55 | 55 |
56 bool InitializeGLBindings(GLImplementation implementation) { | 56 bool InitializeGLBindings(GLImplementation implementation) { |
57 // Prevent reinitialization with a different implementation. Once the gpu | 57 // Prevent reinitialization with a different implementation. Once the gpu |
58 // unit tests have initialized with kGLImplementationMock, we don't want to | 58 // unit tests have initialized with kGLImplementationMock, we don't want to |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 ClearGLBindingsEGL(); | 219 ClearGLBindingsEGL(); |
220 ClearGLBindingsGL(); | 220 ClearGLBindingsGL(); |
221 ClearGLBindingsGLX(); | 221 ClearGLBindingsGLX(); |
222 ClearGLBindingsOSMESA(); | 222 ClearGLBindingsOSMESA(); |
223 SetGLImplementation(kGLImplementationNone); | 223 SetGLImplementation(kGLImplementationNone); |
224 | 224 |
225 UnloadGLNativeLibraries(); | 225 UnloadGLNativeLibraries(); |
226 } | 226 } |
227 | 227 |
228 } // namespace gfx | 228 } // namespace gfx |
OLD | NEW |