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

Side by Side Diff: ui/gfx/gl/gl_implementation_mac.cc

Issue 7019041: Fix up PathProvider on the Mac for FILE_MODULE. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moved os mesa libraries on mac to better location Created 9 years, 7 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 | Annotate | Revision Log
« chrome/chrome_exe.gypi ('K') | « chrome/chrome_exe.gypi ('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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/base_paths.h" 5 #include "base/base_paths.h"
6 #include "base/file_path.h" 6 #include "base/file_path.h"
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/native_library.h" 8 #include "base/native_library.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "ui/gfx/gl/gl_bindings.h" 10 #include "ui/gfx/gl/gl_bindings.h"
(...skipping 13 matching lines...) Expand all
24 return true; 24 return true;
25 25
26 switch (implementation) { 26 switch (implementation) {
27 case kGLImplementationOSMesaGL: { 27 case kGLImplementationOSMesaGL: {
28 FilePath module_path; 28 FilePath module_path;
29 if (!PathService::Get(base::DIR_MODULE, &module_path)) { 29 if (!PathService::Get(base::DIR_MODULE, &module_path)) {
30 LOG(ERROR) << "PathService::Get failed."; 30 LOG(ERROR) << "PathService::Get failed.";
31 return false; 31 return false;
32 } 32 }
33 33
34 // osmesa.so is located in:
35 // Contents/Versions/<vers>/Chromium Framework.framework/Libraries
36 module_path = module_path.DirName().Append("Libraries");
37
34 // When using OSMesa, just use OSMesaGetProcAddress to find entry points. 38 // When using OSMesa, just use OSMesaGetProcAddress to find entry points.
35 base::NativeLibrary library = base::LoadNativeLibrary( 39 base::NativeLibrary library = base::LoadNativeLibrary(
36 module_path.Append("osmesa.so"), NULL); 40 module_path.Append("osmesa.so"), NULL);
37 if (!library) { 41 if (!library) {
38 VLOG(1) << "osmesa.so not found"; 42 VLOG(1) << "osmesa.so not found";
39 return false; 43 return false;
40 } 44 }
41 45
42 GLGetProcAddressProc get_proc_address = 46 GLGetProcAddressProc get_proc_address =
43 reinterpret_cast<GLGetProcAddressProc>( 47 reinterpret_cast<GLGetProcAddressProc>(
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 87
84 return true; 88 return true;
85 } 89 }
86 90
87 void InitializeDebugGLBindings() { 91 void InitializeDebugGLBindings() {
88 InitializeDebugGLBindingsGL(); 92 InitializeDebugGLBindingsGL();
89 InitializeDebugGLBindingsOSMESA(); 93 InitializeDebugGLBindingsOSMESA();
90 } 94 }
91 95
92 } // namespace gfx 96 } // namespace gfx
OLDNEW
« chrome/chrome_exe.gypi ('K') | « chrome/chrome_exe.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698