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

Side by Side Diff: ui/gl/init/gl_initializer_x11.cc

Issue 1542013005: Add a new driver bug workaround SANDBOX_START_EARLY Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 2 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
« no previous file with comments | « ui/gl/init/gl_initializer_win.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ui/gl/init/gl_initializer.h" 5 #include "ui/gl/init/gl_initializer.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/threading/thread_restrictions.h" 10 #include "base/threading/thread_restrictions.h"
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 InitializeDebugGLBindingsOSMESA(); 185 InitializeDebugGLBindingsOSMESA();
186 } 186 }
187 187
188 void ClearGLBindingsPlatform() { 188 void ClearGLBindingsPlatform() {
189 ClearGLBindingsEGL(); 189 ClearGLBindingsEGL();
190 ClearGLBindingsGL(); 190 ClearGLBindingsGL();
191 ClearGLBindingsGLX(); 191 ClearGLBindingsGLX();
192 ClearGLBindingsOSMESA(); 192 ClearGLBindingsOSMESA();
193 } 193 }
194 194
195 bool GetNativeLibraryNamesFromGLImplementationPlatform(
196 GLImplementation implementation,
197 std::vector<std::string>* required_libraries) {
198 DCHECK(required_libraries);
199 required_libraries->clear();
200
201 switch (implementation) {
202 case kGLImplementationDesktopGL:
203 required_libraries->push_back(kGLLibraryName);
204 break;
205 case kGLImplementationEGLGLES2: {
206 base::FilePath glesv2_path(kGLESv2LibraryName);
207 base::FilePath egl_path(kEGLLibraryName);
208
209 if (base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
210 switches::kUseGL) == kGLImplementationANGLEName) {
211 base::FilePath module_path;
212 if (!PathService::Get(base::DIR_MODULE, &module_path))
213 return false;
214
215 glesv2_path = module_path.Append(kGLESv2ANGLELibraryName);
216 egl_path = module_path.Append(kEGLANGLELibraryName);
217 }
218
219 required_libraries->push_back(glesv2_path.value());
220 required_libraries->push_back(egl_path.value());
221 break;
222 }
223 default:
224 return false;
225 }
226
227 return true;
228 }
229
195 } // namespace init 230 } // namespace init
196 } // namespace gl 231 } // namespace gl
OLDNEW
« no previous file with comments | « ui/gl/init/gl_initializer_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698