Commit beac2a86 authored by Mitsuru Oshima's avatar Mitsuru Oshima Committed by Commit Bot

Stop-gap workaround for the graphics issue in CTS+nocturne

Bug: b/148977363
Change-Id: I3568916986b9b5b8917e1ca3afa2cb0be126d150
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2104653Reviewed-by: default avatarYoshiki Iguchi <yoshiki@chromium.org>
Commit-Queue: Mitsuru Oshima <oshima@chromium.org>
Cr-Commit-Position: refs/heads/master@{#750588}
parent 591102e7
......@@ -197,6 +197,20 @@ uint32_t CaptionButtonMask(uint32_t mask) {
return caption_button_icon_mask;
}
void MaybeApplyCTSHack(int layout_mode,
const gfx::Size& size_in_pixel,
gfx::Insets* insets_in_client_pixel,
gfx::Insets* stable_insets_in_client_pixel) {
constexpr int kBadBottomInsets = 90;
if (layout_mode == ZCR_REMOTE_SHELL_V1_LAYOUT_MODE_TABLET &&
size_in_pixel.width() == 3000 && size_in_pixel.height() == 2000 &&
stable_insets_in_client_pixel->bottom() == kBadBottomInsets) {
stable_insets_in_client_pixel->set_bottom(kBadBottomInsets + 1);
if (insets_in_client_pixel->bottom() == kBadBottomInsets)
insets_in_client_pixel->set_bottom(kBadBottomInsets + 1);
}
}
////////////////////////////////////////////////////////////////////////////////
// remote_surface_interface:
......@@ -890,6 +904,10 @@ class WaylandRemoteShell : public ash::TabletModeObserver,
size_in_client_pixel,
GetStableWorkArea(display));
// TODO(b/148977363): Fix the issue and remove the hack.
MaybeApplyCTSHack(layout_mode_, size_in_pixel, &insets_in_client_pixel,
&stable_insets_in_client_pixel);
int systemui_visibility =
shelf_layout_manager->visibility_state() == ash::SHELF_AUTO_HIDE
? ZCR_REMOTE_SURFACE_V1_SYSTEMUI_VISIBILITY_STATE_AUTOHIDE_NON_STICKY
......
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