From d5fe58f355676932d1661b6c04a967d1314a90f1 Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Sat, 10 Feb 2024 18:11:16 +0100 Subject: [PATCH] kms/update: Use bitshifts for fixed_16 helpers For easier understanding. Part-of: --- src/backends/native/meta-kms-update.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backends/native/meta-kms-update.h b/src/backends/native/meta-kms-update.h index b6ca3ae01..096c19eaf 100644 --- a/src/backends/native/meta-kms-update.h +++ b/src/backends/native/meta-kms-update.h @@ -200,19 +200,19 @@ void meta_kms_update_merge_from (MetaKmsUpdate *update, static inline MetaFixed16 meta_fixed_16_from_int (int16_t d) { - return d * 65536; + return d * (1 << 16); } static inline int16_t meta_fixed_16_to_int (MetaFixed16 fixed) { - return fixed / 65536; + return fixed / (1 << 16); } static inline double meta_fixed_16_to_double (MetaFixed16 fixed) { - return fixed / 65536.0; + return fixed / (double) (1 << 16); } static inline MtkRectangle