summaryrefslogtreecommitdiffstats
path: root/app/gfx
diff options
context:
space:
mode:
authorvangelis@chromium.org <vangelis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-10 02:31:39 +0000
committervangelis@chromium.org <vangelis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-10 02:31:39 +0000
commit36a0979bbb626054e4ad550fd406a9acb8d86d00 (patch)
treedf36fad8794735e922c7e4f0667c69ec95b2912a /app/gfx
parent64043ec5fbcef7dabcd6ac71834992d8bfa5dbf0 (diff)
downloadchromium_src-36a0979bbb626054e4ad550fd406a9acb8d86d00.zip
chromium_src-36a0979bbb626054e4ad550fd406a9acb8d86d00.tar.gz
chromium_src-36a0979bbb626054e4ad550fd406a9acb8d86d00.tar.bz2
Loads GL shared libraries from module directories rather than exe directory.
This is because when chrome is installed, the shared libraries go in a different directory to the exe. TEST=try BUG=none Review URL: http://codereview.chromium.org/3351021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59036 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app/gfx')
-rw-r--r--app/gfx/gl/gl_implementation_linux.cc6
-rw-r--r--app/gfx/gl/gl_implementation_mac.cc6
-rw-r--r--app/gfx/gl/gl_implementation_win.cc14
3 files changed, 13 insertions, 13 deletions
diff --git a/app/gfx/gl/gl_implementation_linux.cc b/app/gfx/gl/gl_implementation_linux.cc
index b0eae8e..765ed8a0 100644
--- a/app/gfx/gl/gl_implementation_linux.cc
+++ b/app/gfx/gl/gl_implementation_linux.cc
@@ -39,12 +39,12 @@ bool InitializeGLBindings(GLImplementation implementation) {
switch (implementation) {
case kGLImplementationOSMesaGL: {
- FilePath exe_path;
- if (!PathService::Get(base::DIR_EXE, &exe_path))
+ FilePath module_path;
+ if (!PathService::Get(base::DIR_MODULE, &module_path))
return false;
base::NativeLibrary library = base::LoadNativeLibrary(
- exe_path.Append("libosmesa.so"));
+ module_path.Append("libosmesa.so"));
if (!library) {
DLOG(INFO) << "libosmesa.so not found";
return false;
diff --git a/app/gfx/gl/gl_implementation_mac.cc b/app/gfx/gl/gl_implementation_mac.cc
index d82c2e0..8776ab0 100644
--- a/app/gfx/gl/gl_implementation_mac.cc
+++ b/app/gfx/gl/gl_implementation_mac.cc
@@ -25,13 +25,13 @@ bool InitializeGLBindings(GLImplementation implementation) {
switch (implementation) {
case kGLImplementationOSMesaGL: {
- FilePath exe_path;
- if (!PathService::Get(base::DIR_EXE, &exe_path))
+ FilePath module_path;
+ if (!PathService::Get(base::DIR_MODULE, &module_path))
return false;
// When using OSMesa, just use OSMesaGetProcAddress to find entry points.
base::NativeLibrary library = base::LoadNativeLibrary(
- exe_path.Append("libosmesa.dylib"));
+ module_path.Append("libosmesa.dylib"));
if (!library) {
LOG(INFO) << "libosmesa.so not found";
return false;
diff --git a/app/gfx/gl/gl_implementation_win.cc b/app/gfx/gl/gl_implementation_win.cc
index 3ff0127..fee088b 100644
--- a/app/gfx/gl/gl_implementation_win.cc
+++ b/app/gfx/gl/gl_implementation_win.cc
@@ -36,12 +36,12 @@ bool InitializeGLBindings(GLImplementation implementation) {
switch (implementation) {
case kGLImplementationOSMesaGL: {
- FilePath exe_path;
- if (!PathService::Get(base::DIR_EXE, &exe_path))
+ FilePath module_path;
+ if (!PathService::Get(base::DIR_MODULE, &module_path))
return false;
base::NativeLibrary library = base::LoadNativeLibrary(
- exe_path.Append(L"osmesa.dll"));
+ module_path.Append(L"osmesa.dll"));
if (!library) {
LOG(INFO) << "osmesa.dll not found";
return false;
@@ -61,14 +61,14 @@ bool InitializeGLBindings(GLImplementation implementation) {
break;
}
case kGLImplementationEGLGLES2: {
- FilePath exe_path;
- if (!PathService::Get(base::DIR_EXE, &exe_path))
+ FilePath module_path;
+ if (!PathService::Get(base::DIR_MODULE, &module_path))
return false;
// When using EGL, first try eglGetProcAddress and then Windows
// GetProcAddress on both the EGL and GLES2 DLLs.
base::NativeLibrary egl_library = base::LoadNativeLibrary(
- exe_path.Append(L"libegl.dll"));
+ module_path.Append(L"libegl.dll"));
if (!egl_library) {
LOG(INFO) << "libegl.dll not found.";
return false;
@@ -80,7 +80,7 @@ bool InitializeGLBindings(GLImplementation implementation) {
egl_library, "eglGetProcAddress"));
base::NativeLibrary gles_library = base::LoadNativeLibrary(
- exe_path.Append(L"libglesv2.dll"));
+ module_path.Append(L"libglesv2.dll"));
if (!gles_library) {
base::UnloadNativeLibrary(egl_library);
LOG(ERROR) << "libglesv2.dll not found";