e1b4ad7d0b
All through weston we have code that passes int x, y or float x, y or wl_fixed_t x, y pairs. These pairs are frequently converted to/from wl_fixed_t and other types. We also have struct vec2d and struct weston_geometry which also contain coordinate pairs. Let's create a family of coordinate vector structures for coordinate pairs and use it anywhere we sensibly can. This has a few benefits - it helps remove intermediate conversion between fixed/float/int types. It lets us roll the homogenous coordinate normalization bits into helper functions instead of needing them open coded throughout the source. Possibly most importantly, it also allows us to do some compile time validation of what coordinate space we're working in. Signed-off-by: Derek Foreman <derek.foreman@collabora.com> |
||
---|---|---|
.. | ||
backend-drm.h | ||
backend-headless.h | ||
backend-rdp.h | ||
backend-vnc.h | ||
backend-wayland.h | ||
backend-x11.h | ||
config-parser.h | ||
desktop.h | ||
libweston.h | ||
matrix.h | ||
meson.build | ||
pipewire-plugin.h | ||
plugin-registry.h | ||
remoting-plugin.h | ||
shell-utils.h | ||
version.h.in | ||
weston-log.h | ||
windowed-output-api.h | ||
xwayland-api.h | ||
zalloc.h |