Commit d2e32f00 authored by Michael Spang's avatar Michael Spang Committed by Commit Bot

[fuchsia] Don't upgrade feature flags for isolated runners

Isolated runners are requesting the VULKAN feature by default which
causes the following failure during the test:

[ERROR:vulkan_instance.cc(139)] Required extension VK_KHR_get_physical_device_properties2 missing from enumerated Vulkan extensions. vkCreateInstance will likely fail.
[ERROR:vulkan_instance.cc(202)] vkCreateInstance() failed: -7
[ERROR:gpu_init.cc(698)] Failed to create and initialize Vulkan implementation.
[ERROR:GrGLInterfaceAutogen.cpp(132)] ../../third_party/skia/src/gpu/gl/GrGLInterfaceAutogen.cpp:132 GrGLInterface::validate() failed.
[ERROR:shared_context_state.cc(234)] OOP raster support disabled: GrContext creation failed.

The test currently passes anyway, because (1) GPU process falls silently
back to GL composition and (2) we have enabled mock GL prior to enabling
ANGLE. Once ANGLE is enabled, initializing GL fails which can make the
test crash (although not reliably, these small tests often pass before
the crash occurs).

Don't add feature flags that weren't requested originally. This leaves a
whitelist in place instead.

Bug: 1059497
Change-Id: I03760f857308b1791445301f03011c0b6b982339
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2152207Reviewed-by: default avatarDavid Dorwin <ddorwin@chromium.org>
Reviewed-by: default avatarWez <wez@chromium.org>
Commit-Queue: Michael Spang <spang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#759828}
parent 5a2b62ff
...@@ -67,25 +67,17 @@ fuchsia::web::CreateContextParams BuildCreateContextParamsForIsolatedRunners( ...@@ -67,25 +67,17 @@ fuchsia::web::CreateContextParams BuildCreateContextParamsForIsolatedRunners(
const fuchsia::web::CreateContextParams& create_context_params) { const fuchsia::web::CreateContextParams& create_context_params) {
fuchsia::web::CreateContextParams output; fuchsia::web::CreateContextParams output;
// Isolated contexts receive only a limited set of features. // Isolated contexts are only allowed a limited set of features.
fuchsia::web::ContextFeatureFlags features = // Only pass those features from |create_context_params|.
static constexpr fuchsia::web::ContextFeatureFlags kAllowedFeatures =
fuchsia::web::ContextFeatureFlags::AUDIO | fuchsia::web::ContextFeatureFlags::AUDIO |
fuchsia::web::ContextFeatureFlags::LEGACYMETRICS; fuchsia::web::ContextFeatureFlags::LEGACYMETRICS |
fuchsia::web::ContextFeatureFlags::HEADLESS |
if ((create_context_params.features() & fuchsia::web::ContextFeatureFlags::VULKAN |
fuchsia::web::ContextFeatureFlags::HEADLESS) == fuchsia::web::ContextFeatureFlags::HARDWARE_VIDEO_DECODER |
fuchsia::web::ContextFeatureFlags::HEADLESS) { fuchsia::web::ContextFeatureFlags::HARDWARE_VIDEO_DECODER_ONLY;
features |= fuchsia::web::ContextFeatureFlags::HEADLESS; DCHECK(create_context_params.has_features());
} else { output.set_features(create_context_params.features() & kAllowedFeatures);
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()) { if (create_context_params.has_user_agent_product()) {
output.set_user_agent_product(create_context_params.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