headless: Switch from osmesa to SwiftShader
Now that SwiftShader is shipped with Chrome we can start using it to
render GL content in headless mode. This requires a couple of changes:
1. Skip GPU data collection in headless mode since SwiftShader isn't
considered a software implementation by that code, leading to a
failure when we try to retrieve information from the window system.
2. Only skip GL initialization in InitializeStaticEGLInternal if we're
using osmesa. SwiftShader requires initialization like the other
non-software implementations.
We also fix a bug where any --use-gl flag specified by the user was
overwritten internally.
Note that SwiftShader is currently not supported on macOS, so we will
continue to use the physical GPU in headless mode on that platform
(unlike on other platforms where everything is software rendered).
To disable WebGL support in headless mode from now on, use --disable-gpu
--disable-software-rasterizer.
BUG=617551
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: I5ef044f7298afe416f56526f42d2c190466b58e9
Reviewed-on: https://chromium-review.googlesource.com/522068
Commit-Queue: Sami Kyöstilä <skyostil@chromium.org>
Reviewed-by: Alexis Hétu <sugoi@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#477253}
8 files changed