GHOST/Wayland: avoid up-scaling window content

When a window overlaps multiple outputs, always use the resolution
on the output with the highest resolution. This means Blender never
shows low resolution content up-scaled.
This commit is contained in:
Campbell Barton
2023-04-11 16:00:59 +10:00
parent f50c319a4b
commit 4fe2685615

View File

@@ -1937,6 +1937,16 @@ bool GHOST_WindowWayland::outputs_changed_update_scale()
fractional_scale_next = fractional_scale_from_output;
scale_next = fractional_scale_next / FRACTIONAL_DENOMINATOR;
}
else {
/* NOTE(@ideasman42): This often overrides #wp_fractional_scale_v1_listener::preferred_scale
* in favor of using the greatest overlapping scale.
* This was requested by the studio to prevent a tablet's built-in display of 75%
* from causing the main-display being up-scaled (showing pixelated). */
if (fractional_scale_next < fractional_scale_from_output) {
fractional_scale_next = fractional_scale_from_output;
scale_next = fractional_scale_next / FRACTIONAL_DENOMINATOR;
}
}
bool changed = false;