Commit 84555907 authored by Brian Ho's avatar Brian Ho Committed by Chromium LUCI CQ

viz: Disable fullscreen overlay strategy on CrOS Skia

When SkiaRenderer is enabled on Chrome OS, we see a spike of
crash reports [1] in SkiaOutputDeviceBufferQueue from |current_image|
and |submitted_image| both being null [2]. One way this can manifest
is when an overlay promoted via the fullscreen strategy becomes
unpromoted without any change in damage (e.g. through a test page
flip failing).

At a high level, the order of operations for rendering a frame in
SkiaOutputDeviceBufferQueue is: BeginPaint/EndPaint ->
SchedulePrimaryPlane -> PostSubBuffer. If the only quad displayed
is promoted to a fullscreen overlay, |PostSubBuffer| will clear both
|submitted_image_| and |current_image_| [3]. Normally, the next frame
will invoke |BeginPaint| which in turn sets a new |current_image_|
[4], but if there's no damage, this won't get called. As a result, in
|SchedulePrimaryPlane|, Chrome crashes.

This CL fixes this error by disabling the fullscreen overlay strategy
when SkiaRenderer is enabled. Since this crash is difficut to
repro deterministically, this is just a quick fix to see if the
fullscreen strategy is actually the culprit we see in canary/dev. I
expect to implement a full fix later.

[1] https://bugs.chromium.org/p/chromium/issues/detail?id=1156182
[2] https://source.chromium.org/chromium/chromium/src/+/master:components/viz/service/display_embedder/skia_output_device_buffer_queue.cc;l=209;drc=cb3ff30296f61e6f66de70fa33bd9f5169a1ff88
[3] https://source.chromium.org/chromium/chromium/src/+/master:components/viz/service/display_embedder/skia_output_device_buffer_queue.cc;l=343;drc=cb3ff30296f61e6f66de70fa33bd9f5169a1ff88
[4] https://source.chromium.org/chromium/chromium/src/+/master:components/viz/service/display_embedder/skia_output_device_buffer_queue.cc;l=514;drc=cb3ff30296f61e6f66de70fa33bd9f5169a1ff88

Bug: 1156182
Change-Id: I3db7cf64cae0f5adadba160defb4c3353ef4a6fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2613685Reviewed-by: default avatarDaniele Castagna <dcastagna@chromium.org>
Commit-Queue: Brian Ho <hob@chromium.org>
Cr-Commit-Position: refs/heads/master@{#841073}
parent e2f8015e
......@@ -89,9 +89,18 @@ RendererSettings CreateRendererSettings() {
auto& host_properties =
ui::OzonePlatform::GetInstance()->GetInitializedHostProperties();
if (host_properties.supports_overlays) {
renderer_settings.overlay_strategies = {OverlayStrategy::kFullscreen,
OverlayStrategy::kSingleOnTop,
renderer_settings.overlay_strategies = {OverlayStrategy::kSingleOnTop,
OverlayStrategy::kUnderlay};
// TODO(https://crbug.com/1156182): We suspect overlays promoted via
// fullscreen strategy cause crashes on Chrome OS with SkiaRenderer,
// so let's disable the strategy with Skia as a quick fix. All
// overlays previously covered by the fullscreen strategy should
// still be promoted via SingleOnTop, just a little bit less
// performantly. Re-enable the fullscreen overlay strategy when fixed.
if (!renderer_settings.use_skia_renderer) {
renderer_settings.overlay_strategies.push_back(
OverlayStrategy::kFullscreen);
}
}
}
}
......
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