Skip to content

Commit 6ce870a

Browse files
committed
<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 <[email protected]>
1 parent 1f3cc8c commit 6ce870a

File tree

3 files changed

+29
-6
lines changed

3 files changed

+29
-6
lines changed

chromium/content/content_gpu.gypi

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
'..',
2424
],
2525
'conditions': [
26-
['OS=="win"', {
26+
['OS=="win" and use_qt==0', {
2727
'include_dirs': [
2828
'<(DEPTH)/third_party/khronos',
2929
'<(angle_path)/src',
@@ -39,6 +39,15 @@
3939
],
4040
},
4141
}],
42+
['qt_os=="win32"', {
43+
'link_settings': {
44+
'libraries': [
45+
'-lsetupapi.lib',
46+
'-l<(qt_egl_library)',
47+
'-l<(qt_glesv2_library)',
48+
],
49+
},
50+
}],
4251
['OS=="win" and target_arch=="ia32" and directxsdk_exists=="True"', {
4352
# We don't support x64 prior to Win7 and D3DCompiler_43.dll is
4453
# not needed on Vista+.

chromium/ui/compositor/compositor.gyp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
'transform_animation_curve_adapter.h',
5959
],
6060
'conditions': [
61-
['OS == "win" and use_aura == 1', {
61+
['OS == "win" and use_aura == 1 and use_qt==0', {
6262
# TODO(sky): before we make this real need to remove
6363
# IDR_BITMAP_BRUSH_IMAGE.
6464
'dependencies': [
@@ -67,6 +67,12 @@
6767
'<(angle_path)/src/build_angle.gyp:libGLESv2',
6868
],
6969
}],
70+
['use_aura == 1 and qt_os=="win32"', {
71+
'libraries': [
72+
'-l<(qt_egl_library)',
73+
'-l<(qt_glesv2_library)',
74+
],
75+
}],
7076
],
7177
},
7278
{

chromium/ui/gl/gl_implementation_win.cc

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ namespace {
3636
const wchar_t kPreVistaD3DCompiler[] = L"D3DCompiler_43.dll";
3737
const wchar_t kPostVistaD3DCompiler[] = L"D3DCompiler_46.dll";
3838

39+
#if defined(NDEBUG)
40+
const wchar_t kQtGLESv2Library[] = L"libglesv2.dll";
41+
const wchar_t kQtEGLLibrary[] = L"libegl.dll";
42+
#else
43+
const wchar_t kQtGLESv2Library[] = L"libglesv2d.dll";
44+
const wchar_t kQtEGLLibrary[] = L"libegld.dll";
45+
#endif
46+
3947
void GL_BINDING_CALL MarshalClearDepthToClearDepthf(GLclampd depth) {
4048
glClearDepthf(static_cast<GLclampf>(depth));
4149
}
@@ -185,18 +193,18 @@ bool InitializeGLBindings(GLImplementation implementation) {
185193
// the former and if there is another version of libglesv2.dll in the dll
186194
// search path, it will get loaded instead.
187195
base::NativeLibrary gles_library = base::LoadNativeLibrary(
188-
gles_path.Append(L"libglesv2.dll"), NULL);
196+
gles_path.Append(kQtGLESv2Library), NULL);
189197
if (!gles_library) {
190-
DVLOG(1) << "libglesv2.dll not found";
198+
DVLOG(1) << kQtGLESv2Library << " not found";
191199
return false;
192200
}
193201

194202
// When using EGL, first try eglGetProcAddress and then Windows
195203
// GetProcAddress on both the EGL and GLES2 DLLs.
196204
base::NativeLibrary egl_library = base::LoadNativeLibrary(
197-
gles_path.Append(L"libegl.dll"), NULL);
205+
gles_path.Append(kQtEGLLibrary), NULL);
198206
if (!egl_library) {
199-
DVLOG(1) << "libegl.dll not found.";
207+
DVLOG(1) << kQtEGLLibrary << " not found.";
200208
base::UnloadNativeLibrary(gles_library);
201209
return false;
202210
}

0 commit comments

Comments
 (0)