summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael BrĂ¼ning <michael.bruning@digia.com>2014-07-01 15:47:29 +0200
committerMichael Bruning <michael.bruning@digia.com>2014-07-01 16:36:26 +0200
commit6ce870ab779829642c6a9e63e006894e8a3bb706 (patch)
treea619b30dbd2daaf6ab2d6577fb1467a7406c146e
parent1f3cc8c2618979b557d60ef1ad984a49dca83bff (diff)
<chromium> Use ANGLE libraries from the Qt build / installation.
This moves libEGL and libGLESv2 from dependencies to libraries where needed. This also adds support for using the correct configuration of the ANGLE libraries for linking and runtime loading. Change-Id: I8c3a5eb11517bf03e921b257eeb3a34b7bc841ea Reviewed-by: Andras Becsi <andras.becsi@digia.com>
-rw-r--r--chromium/content/content_gpu.gypi11
-rw-r--r--chromium/ui/compositor/compositor.gyp8
-rw-r--r--chromium/ui/gl/gl_implementation_win.cc16
3 files changed, 29 insertions, 6 deletions
diff --git a/chromium/content/content_gpu.gypi b/chromium/content/content_gpu.gypi
index 453fbecce80..342cba1016a 100644
--- a/chromium/content/content_gpu.gypi
+++ b/chromium/content/content_gpu.gypi
@@ -23,7 +23,7 @@
'..',
],
'conditions': [
- ['OS=="win"', {
+ ['OS=="win" and use_qt==0', {
'include_dirs': [
'<(DEPTH)/third_party/khronos',
'<(angle_path)/src',
@@ -39,6 +39,15 @@
],
},
}],
+ ['qt_os=="win32"', {
+ 'link_settings': {
+ 'libraries': [
+ '-lsetupapi.lib',
+ '-l<(qt_egl_library)',
+ '-l<(qt_glesv2_library)',
+ ],
+ },
+ }],
['OS=="win" and target_arch=="ia32" and directxsdk_exists=="True"', {
# We don't support x64 prior to Win7 and D3DCompiler_43.dll is
# not needed on Vista+.
diff --git a/chromium/ui/compositor/compositor.gyp b/chromium/ui/compositor/compositor.gyp
index 405b46d7ce9..d34ac2cb870 100644
--- a/chromium/ui/compositor/compositor.gyp
+++ b/chromium/ui/compositor/compositor.gyp
@@ -58,7 +58,7 @@
'transform_animation_curve_adapter.h',
],
'conditions': [
- ['OS == "win" and use_aura == 1', {
+ ['OS == "win" and use_aura == 1 and use_qt==0', {
# TODO(sky): before we make this real need to remove
# IDR_BITMAP_BRUSH_IMAGE.
'dependencies': [
@@ -67,6 +67,12 @@
'<(angle_path)/src/build_angle.gyp:libGLESv2',
],
}],
+ ['use_aura == 1 and qt_os=="win32"', {
+ 'libraries': [
+ '-l<(qt_egl_library)',
+ '-l<(qt_glesv2_library)',
+ ],
+ }],
],
},
{
diff --git a/chromium/ui/gl/gl_implementation_win.cc b/chromium/ui/gl/gl_implementation_win.cc
index 87328a306f8..338fa02d3ec 100644
--- a/chromium/ui/gl/gl_implementation_win.cc
+++ b/chromium/ui/gl/gl_implementation_win.cc
@@ -36,6 +36,14 @@ namespace {
const wchar_t kPreVistaD3DCompiler[] = L"D3DCompiler_43.dll";
const wchar_t kPostVistaD3DCompiler[] = L"D3DCompiler_46.dll";
+#if defined(NDEBUG)
+const wchar_t kQtGLESv2Library[] = L"libglesv2.dll";
+const wchar_t kQtEGLLibrary[] = L"libegl.dll";
+#else
+const wchar_t kQtGLESv2Library[] = L"libglesv2d.dll";
+const wchar_t kQtEGLLibrary[] = L"libegld.dll";
+#endif
+
void GL_BINDING_CALL MarshalClearDepthToClearDepthf(GLclampd depth) {
glClearDepthf(static_cast<GLclampf>(depth));
}
@@ -185,18 +193,18 @@ bool InitializeGLBindings(GLImplementation implementation) {
// the former and if there is another version of libglesv2.dll in the dll
// search path, it will get loaded instead.
base::NativeLibrary gles_library = base::LoadNativeLibrary(
- gles_path.Append(L"libglesv2.dll"), NULL);
+ gles_path.Append(kQtGLESv2Library), NULL);
if (!gles_library) {
- DVLOG(1) << "libglesv2.dll not found";
+ DVLOG(1) << kQtGLESv2Library << " not found";
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(
- gles_path.Append(L"libegl.dll"), NULL);
+ gles_path.Append(kQtEGLLibrary), NULL);
if (!egl_library) {
- DVLOG(1) << "libegl.dll not found.";
+ DVLOG(1) << kQtEGLLibrary << " not found.";
base::UnloadNativeLibrary(gles_library);
return false;
}