Commit a96ef56c authored by Dmitry Torokhov's avatar Dmitry Torokhov Committed by Commit Bot

exo: temporarily clamp display scale factor to 2

Version of QT currently in use by Parallels Desktop does not render
correctly when display scale factor is above 2, so let's use 2 as the
upper bound until they switch to a newer version of QT (5.15 should
have the fix).

Bug: b/169984627
Change-Id: Idd31b9a737833fa48ab6b20ae8da5f1bf951b3ff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2446720
Commit-Queue: Dmitry Torokhov <dtor@chromium.org>
Reviewed-by: default avatarMitsuru Oshima <oshima@chromium.org>
Cr-Commit-Position: refs/heads/master@{#816020}
parent 2d23f467
...@@ -117,8 +117,11 @@ bool WaylandDisplayHandler::SendDisplayMetrics(const display::Display& display, ...@@ -117,8 +117,11 @@ bool WaylandDisplayHandler::SendDisplayMetrics(const display::Display& display,
WL_OUTPUT_SCALE_SINCE_VERSION) { WL_OUTPUT_SCALE_SINCE_VERSION) {
// wl_output only supports integer scaling, so if device scale factor is // wl_output only supports integer scaling, so if device scale factor is
// fractional we need to round it up to the closest integer. // fractional we need to round it up to the closest integer.
wl_output_send_scale(output_resource_, // TODO(b/169984627, crbug:1137268): remove clamping to 2 once Parallels
std::ceil(display.device_scale_factor())); // switches to a newer version of QT.
wl_output_send_scale(
output_resource_,
std::min(std::ceil(display.device_scale_factor()), 2.0f));
} }
// TODO(reveman): Send real list of modes. // TODO(reveman): Send real list of modes.
......
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