[cogl/jjardon/static_inline] cogl/deprecated/cogl-fixed.h: Use "static inline" instead G_INLINE_FUNC



commit 8631f994195ceed4773731b6286a21af155e5940
Author: Javier Jardón <jjardon gnome org>
Date:   Sun Mar 17 17:33:00 2019 -0700

    cogl/deprecated/cogl-fixed.h: Use "static inline" instead G_INLINE_FUNC

 cogl/deprecated/cogl-fixed.h | 53 +++-----------------------------------------
 1 file changed, 3 insertions(+), 50 deletions(-)
---
diff --git a/cogl/deprecated/cogl-fixed.h b/cogl/deprecated/cogl-fixed.h
index 73d0ed59..5339f8c0 100644
--- a/cogl/deprecated/cogl-fixed.h
+++ b/cogl/deprecated/cogl-fixed.h
@@ -536,15 +536,15 @@ cogl_fixed_atan2 (CoglFixed a,
 /*< public >*/
 
 /* Fixed point math routines */
-G_INLINE_FUNC CoglFixed
+static inline CoglFixed
 cogl_fixed_mul (CoglFixed a,
                 CoglFixed b);
 
-G_INLINE_FUNC CoglFixed
+static inline CoglFixed
 cogl_fixed_div (CoglFixed a,
                 CoglFixed b);
 
-G_INLINE_FUNC CoglFixed
+static inline CoglFixed
 cogl_fixed_mul_div (CoglFixed a,
                     CoglFixed b,
                     CoglFixed c);
@@ -750,53 +750,6 @@ cogl_angle_tan (CoglAngle angle);
 CoglFixed
 cogl_angle_cos (CoglAngle angle);
 
-/*< private >*/
-
-#if defined (G_CAN_INLINE)
-G_INLINE_FUNC CoglFixed
-cogl_fixed_mul (CoglFixed a,
-                CoglFixed b)
-{
-# ifdef __arm__
-    int res_low, res_hi;
-
-    __asm__ ("smull %0, %1, %2, %3     \n"
-            "mov   %0, %0,     lsr %4 \n"
-            "add   %1, %0, %1, lsl %5 \n"
-            : "=r"(res_hi), "=r"(res_low)\
-            : "r"(a), "r"(b), "i"(COGL_FIXED_Q), "i"(32 - COGL_FIXED_Q));
-
-    return (CoglFixed) res_low;
-# else
-    long long r = (long long) a * (long long) b;
-
-    return (unsigned int)(r >> COGL_FIXED_Q);
-# endif
-}
-#endif
-
-#if defined (G_CAN_INLINE)
-G_INLINE_FUNC CoglFixed
-cogl_fixed_div (CoglFixed a,
-                CoglFixed b)
-{
-  return (CoglFixed) ((((int64_t) a) << COGL_FIXED_Q) / b);
-}
-#endif
-
-#if defined(G_CAN_INLINE)
-G_INLINE_FUNC CoglFixed
-cogl_fixed_mul_div (CoglFixed a,
-                    CoglFixed b,
-                    CoglFixed c)
-{
-  CoglFixed ab = cogl_fixed_mul (a, b);
-  CoglFixed quo = cogl_fixed_div (ab, c);
-
-  return quo;
-}
-#endif
-
 CoglFixed
 cogl_double_to_fixed (double value);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]