Commit 7a1443f8 authored by Julien Isorce's avatar Julien Isorce Committed by Commit Bot

Fix regression --use-gl=egl does not select Mesa anymore

Instead it always selects angle, like if --use-gl=angle was set
which makes --use-gl=egl useless.

My understanding is that --use-gl=egl is supposed to select
the defaults libEGL.so.1/libGLESv2.so.2 available on the system.

Regression introduced by 06a905b5
"Fixed fallback to software for tests"
https://chromium-review.googlesource.com/517912

BUG=726075

Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: Idf3cfb1b5480a112f73b7e7c20f4d4ade1cc2a51
Reviewed-on: https://chromium-review.googlesource.com/690074Reviewed-by: default avatarAlexis Hétu <sugoi@chromium.org>
Reviewed-by: default avatarKenneth Russell <kbr@chromium.org>
Commit-Queue: Julien Isorce <julien.isorce@chromium.org>
Cr-Commit-Position: refs/heads/master@{#505331}
parent 2d3ae231
...@@ -24,7 +24,7 @@ bool InitializeGLOneOffHelper(bool init_extensions) { ...@@ -24,7 +24,7 @@ bool InitializeGLOneOffHelper(bool init_extensions) {
std::vector<GLImplementation> allowed_impls = GetAllowedGLImplementations(); std::vector<GLImplementation> allowed_impls = GetAllowedGLImplementations();
DCHECK(!allowed_impls.empty()); DCHECK(!allowed_impls.empty());
base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); const base::CommandLine* cmd = base::CommandLine::ForCurrentProcess();
// The default implementation is always the first one in list. // The default implementation is always the first one in list.
GLImplementation impl = allowed_impls[0]; GLImplementation impl = allowed_impls[0];
......
...@@ -85,6 +85,8 @@ bool InitializeStaticEGLInternal(GLImplementation implementation) { ...@@ -85,6 +85,8 @@ bool InitializeStaticEGLInternal(GLImplementation implementation) {
base::FilePath glesv2_path(kGLESv2LibraryName); base::FilePath glesv2_path(kGLESv2LibraryName);
base::FilePath egl_path(kEGLLibraryName); base::FilePath egl_path(kEGLLibraryName);
const base::CommandLine* cmd = base::CommandLine::ForCurrentProcess();
if (implementation == kGLImplementationSwiftShaderGL) { if (implementation == kGLImplementationSwiftShaderGL) {
#if BUILDFLAG(ENABLE_SWIFTSHADER) #if BUILDFLAG(ENABLE_SWIFTSHADER)
base::FilePath module_path; base::FilePath module_path;
...@@ -97,7 +99,8 @@ bool InitializeStaticEGLInternal(GLImplementation implementation) { ...@@ -97,7 +99,8 @@ bool InitializeStaticEGLInternal(GLImplementation implementation) {
#else #else
return false; return false;
#endif #endif
} else { } else if (cmd->GetSwitchValueASCII(switches::kUseGL) ==
kGLImplementationANGLEName) {
base::FilePath module_path; base::FilePath module_path;
if (!PathService::Get(base::DIR_MODULE, &module_path)) if (!PathService::Get(base::DIR_MODULE, &module_path))
return false; return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment