Commit 0d66b79e authored by Michael Spang's avatar Michael Spang Committed by Commit Bot

[CastRunner] Don't pass VULKAN context flag in headless tests

It's an error to enable VULKAN without exposing
fuchsia.vulkan.loader.Loader in the sandbox.

The rest of the flags are still ignored and left as a TODO.

Bug: 1059497
Change-Id: I96a4c1f51b5ee76f5df075a53afd92e029169f9a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2093052
Commit-Queue: Michael Spang <spang@chromium.org>
Auto-Submit: Michael Spang <spang@chromium.org>
Reviewed-by: default avatarFabrice de Gans-Riberi <fdegans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#747963}
parent b32d49ba
......@@ -33,11 +33,23 @@ fuchsia::web::CreateContextParams BuildCreateContextParamsForIsolatedRunners(
fuchsia::web::CreateContextParams output;
// Isolated contexts receive only a limited set of features.
output.set_features(
fuchsia::web::ContextFeatureFlags::AUDIO |
fuchsia::web::ContextFeatureFlags::VULKAN |
fuchsia::web::ContextFeatureFlags::HARDWARE_VIDEO_DECODER |
fuchsia::web::ContextFeatureFlags::HARDWARE_VIDEO_DECODER_ONLY);
fuchsia::web::ContextFeatureFlags features =
fuchsia::web::ContextFeatureFlags::AUDIO;
if ((create_context_params.features() &
fuchsia::web::ContextFeatureFlags::HEADLESS) ==
fuchsia::web::ContextFeatureFlags::HEADLESS) {
features |= fuchsia::web::ContextFeatureFlags::HEADLESS;
} else {
features |= fuchsia::web::ContextFeatureFlags::VULKAN |
fuchsia::web::ContextFeatureFlags::HARDWARE_VIDEO_DECODER |
fuchsia::web::ContextFeatureFlags::HARDWARE_VIDEO_DECODER_ONLY;
}
// The rest of |create_context_params.features()| is ignored.
// TODO(crbug.com/1059497): Respect the flags or don't pass them in tests.
output.set_features(features);
if (create_context_params.has_user_agent_product()) {
output.set_user_agent_product(create_context_params.user_agent_product());
......
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