Commit 304fefa4 authored by Wez's avatar Wez Committed by Commit Bot

[Fuchsia] Disable fallback to SW compositing.

Previously WebEngine was falling back to SW compositing after 3
GPU process crashes. This is not desirable when Vulkan is enabled
because it may mask other issues. Also not all features work correctly
with SW compositing (e.g. it's not compatible with HW video decoder).

Also added --disable-software-rasterizer to disable SwiftShader as
we should never need to use it on Fuchsia.

Bug: 38358
Change-Id: I3dca90da04e51762e83f90217a574189545a358b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1905267Reviewed-by: default avatarSergey Ulanov <sergeyu@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Wez <wez@chromium.org>
Auto-Submit: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#714322}
parent d32ad370
......@@ -998,10 +998,12 @@ gpu::GpuMode GpuDataManagerImplPrivate::GetGpuMode() const {
}
void GpuDataManagerImplPrivate::FallBackToNextGpuMode() {
#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
#if defined(OS_ANDROID) || defined(OS_CHROMEOS) || defined(OS_FUCHSIA)
// Android and Chrome OS can't switch to software compositing. If the GPU
// process initialization fails or GPU process is too unstable then crash the
// browser process to reset everything.
// On Fuchsia Vulkan must be used when it's enabled by the WebEngine embedder.
// Falling back to SW compositing in that case is not supported.
#if defined(OS_ANDROID)
FatalGpuProcessLaunchFailureOnBackground();
#endif
......
......@@ -247,14 +247,28 @@ void ContextProviderImpl::Create(
}
if (enable_vulkan) {
DLOG(ERROR) << "Enabling Vulkan GPU acceleration.";
// Vulkan requires use of SkiaRenderer, configured to a use Vulkan context.
launch_command.AppendSwitch(switches::kUseVulkan);
launch_command.AppendSwitchASCII(switches::kEnableFeatures,
features::kUseSkiaRenderer.name);
launch_command.AppendSwitchASCII(switches::kGrContextType,
switches::kGrContextTypeVulkan);
// SkiaRenderer requires out-of-process rasterization be enabled.
launch_command.AppendSwitch(switches::kEnableOopRasterization);
// TODO(https://crbug.com/766360): Provide a no-op GL implementation until
// vANGLE is available.
launch_command.AppendSwitchASCII(switches::kUseGL,
gl::kGLImplementationStubName);
launch_command.AppendSwitchASCII(switches::kGrContextType,
switches::kGrContextTypeVulkan);
} else {
DLOG(ERROR) << "Disabling GPU acceleration.";
// Disable use of Vulkan GPU, and use of the software-GL rasterizer. The
// Context will still run a GPU process, but will not support WebGL.
launch_command.AppendSwitch(switches::kDisableGpu);
launch_command.AppendSwitch(switches::kDisableSoftwareRasterizer);
}
if (enable_widevine) {
......
......@@ -172,7 +172,8 @@ class CastRunnerIntegrationTest : public testing::Test {
TestTimeouts::action_timeout(),
base::MakeExpectedNotRunClosure(FROM_HERE, "Run() timed out.")) {
// Create the CastRunner, published into |outgoing_directory_|.
constexpr fuchsia::web::ContextFeatureFlags kFeatures = {};
constexpr fuchsia::web::ContextFeatureFlags kFeatures = {
fuchsia::web::ContextFeatureFlags::NETWORK};
fuchsia::web::CreateContextParams create_context_params =
WebContentRunner::BuildCreateContextParams(
fidl::InterfaceHandle<fuchsia::io::Directory>(), kFeatures);
......
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