From 582825eda792c2612ab6f43a14ccb2bea3aee5d4 Mon Sep 17 00:00:00 2001 From: Phil Jones Date: Mon, 6 Mar 2023 21:27:16 +0000 Subject: Add fractional scaling support. The main change is that we now always have to set up the dummy surface which was previously only used when multiple monitors were present. This is because there's no way to determine an output's fractional scale factor without displaying a surface on it, and we need to know the scale factor before we create our main window surface. The extra compositor round-trips lead to a slight slowdown for single monitor setups (to the same speed as multi-monitor setups), but it's currently unavoidable as far as I know. --- src/scale.h | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/scale.h (limited to 'src/scale.h') diff --git a/src/scale.h b/src/scale.h new file mode 100644 index 0000000..47cb809 --- /dev/null +++ b/src/scale.h @@ -0,0 +1,9 @@ +#ifndef SCALE_H +#define SCALE_H + +#include + +uint32_t scale_apply(uint32_t base, uint32_t scale); +uint32_t scale_apply_inverse(uint32_t base, uint32_t scale); + +#endif /* SCALE_H */ -- cgit v1.2.3