Add support for rudimentary fractional scaling

When the logical layout mode is used, allow configuring the scaling to
be non-integer. Supported scales are so far hard coded to include at
most 1, 1.5 and 2, and scales that doesn't result in non-fractional
logical monitor sizes are discarded.

Wayland outputs are set to have scale ceil(actual_scale) meaning well
behaving Wayland clients will provide buffers with buffer scale 2, thus
being scaled down to the fractional scale.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
This commit is contained in:
Jonas Ådahl
2017-05-25 17:20:59 +08:00
parent b64c69e4bc
commit 10b0351a59
12 changed files with 126 additions and 59 deletions

View File

@ -437,9 +437,9 @@ check_logical_monitor (MonitorTestCase *test_case,
g_assert_cmpint (logical_monitor->rect.height,
==,
test_logical_monitor->layout.height);
g_assert_cmpint (logical_monitor->scale,
==,
test_logical_monitor->scale);
g_assert_cmpfloat (logical_monitor->scale,
==,
test_logical_monitor->scale);
g_assert_cmpuint (logical_monitor->transform,
==,
test_logical_monitor->transform);