0003-pixman-combine-float.c-fix-inlining-failed-error.patch 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. From 643f098a3922592c82f3ea19668a1596d92a3e7b Mon Sep 17 00:00:00 2001
  2. From: Changqing Li <changqing.li@windriver.com>
  3. Date: Tue, 16 Jul 2024 15:31:16 +0800
  4. Subject: [PATCH] pixman-combine-float.c: fix inlining failed error
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. Refer [1], always-inline is not suggested to be used if you have indirect
  9. calls. so replace force_inline with inline to fix error like:
  10. In function ‘combine_inner’,
  11. inlined from ‘combine_soft_light_ca_float’ at ../pixman/pixman-combine-float.c:655:511:
  12. ../pixman/pixman-combine-float.c:655:211: error: inlining failed in call to ‘always_inline’ ‘combine_soft_light_c’: function not considered for inlining
  13. Test with gcc-9 and gcc-14, both works well
  14. [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115679
  15. Signed-off-by: Changqing Li <changqing.li@windriver.com>
  16. Upstream: https://gitlab.freedesktop.org/pixman/pixman/-/commit/643f098a3922592c82f3ea19668a1596d92a3e7b
  17. ---
  18. pixman/pixman-combine-float.c | 6 +++---
  19. 1 file changed, 3 insertions(+), 3 deletions(-)
  20. diff --git a/pixman/pixman-combine-float.c b/pixman/pixman-combine-float.c
  21. index e1f8030..230164f 100644
  22. --- a/pixman/pixman-combine-float.c
  23. +++ b/pixman/pixman-combine-float.c
  24. @@ -261,7 +261,7 @@ get_factor (combine_factor_t factor, float sa, float da)
  25. }
  26. #define MAKE_PD_COMBINERS(name, a, b) \
  27. - static float force_inline \
  28. + static float \
  29. pd_combine_ ## name (float sa, float s, float da, float d) \
  30. { \
  31. const float fa = get_factor (a, sa, da); \
  32. @@ -360,13 +360,13 @@ MAKE_PD_COMBINERS (conjoint_xor, ONE_MINUS_DA_OVER_SA, ONE_MINUS_SA_OVER_DA)
  33. */
  34. #define MAKE_SEPARABLE_PDF_COMBINERS(name) \
  35. - static force_inline float \
  36. + static float \
  37. combine_ ## name ## _a (float sa, float s, float da, float d) \
  38. { \
  39. return da + sa - da * sa; \
  40. } \
  41. \
  42. - static force_inline float \
  43. + static float \
  44. combine_ ## name ## _c (float sa, float s, float da, float d) \
  45. { \
  46. float f = (1 - sa) * d + (1 - da) * s; \
  47. --
  48. 2.47.1