[mutter] kms: Add a trivial meta_fixed_16_to_double conversion function
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] kms: Add a trivial meta_fixed_16_to_double conversion function
- Date: Tue, 13 Jul 2021 08:08:59 +0000 (UTC)
commit b59c5386b9f72efe98c6adf6ce50a121c99b6207
Author: Daniel van Vugt <daniel van vugt canonical com>
Date: Tue Jul 13 15:21:43 2021 +0800
kms: Add a trivial meta_fixed_16_to_double conversion function
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1923>
src/backends/native/meta-kms-update.h | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/src/backends/native/meta-kms-update.h b/src/backends/native/meta-kms-update.h
index 0c7707bbc4..4a6a8bb437 100644
--- a/src/backends/native/meta-kms-update.h
+++ b/src/backends/native/meta-kms-update.h
@@ -158,6 +158,12 @@ meta_fixed_16_to_int (MetaFixed16 fixed)
return fixed / 65536;
}
+static inline double
+meta_fixed_16_to_double (MetaFixed16 fixed)
+{
+ return fixed / 65536.0;
+}
+
static inline MetaRectangle
meta_fixed_16_rectangle_to_rectangle (MetaFixed16Rectangle fixed_rect)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]