From 47f60742dc51c3d460a4a29dede426d6dd99fe26 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sun, 27 Aug 2006 22:54:43 +0000 Subject: cairo: Add 1.2.4 (including float conversion speedup) (from poky) --- packages/cairo/files/.mtn2git_empty | 0 packages/cairo/files/cairo-fixed.patch | 43 ++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 packages/cairo/files/.mtn2git_empty create mode 100644 packages/cairo/files/cairo-fixed.patch (limited to 'packages/cairo/files') diff --git a/packages/cairo/files/.mtn2git_empty b/packages/cairo/files/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/cairo/files/cairo-fixed.patch b/packages/cairo/files/cairo-fixed.patch new file mode 100644 index 0000000000..8df54d9cb5 --- /dev/null +++ b/packages/cairo/files/cairo-fixed.patch @@ -0,0 +1,43 @@ +diff -ur cairo-1.2.4/src/cairo-fixed.c cairo-1.2.4-new/src/cairo-fixed.c +--- cairo-1.2.4/src/cairo-fixed.c 2006-06-10 07:07:37.000000000 +0300 ++++ cairo-1.2.4-new/src/cairo-fixed.c 2006-08-25 13:06:26.000000000 +0300 +@@ -43,12 +43,6 @@ + } + + cairo_fixed_t +-_cairo_fixed_from_double (double d) +-{ +- return (cairo_fixed_t) floor (d * 65536 + 0.5); +-} +- +-cairo_fixed_t + _cairo_fixed_from_26_6 (uint32_t i) + { + return i << 10; +diff -ur cairo-1.2.4/src/cairoint.h cairo-1.2.4-new/src/cairoint.h +--- cairo-1.2.4/src/cairoint.h 2006-08-18 17:20:16.000000000 +0300 ++++ cairo-1.2.4-new/src/cairoint.h 2006-08-25 13:14:07.000000000 +0300 +@@ -1117,8 +1117,21 @@ + + #define CAIRO_FIXED_ONE _cairo_fixed_from_int (1) + +-cairo_private cairo_fixed_t +-_cairo_fixed_from_double (double d); ++#define CAIRO_DOUBLE2FIX_MAGIC 103079215104.0 /* 2 ^ (52 - 16) * 1.5 */ ++ ++#ifdef WORDS_BIGENDIAN ++#define iman 1 ++#else ++#define iman 0 ++#endif ++ ++static inline cairo_fixed_t ++_cairo_fixed_from_double (double d) ++{ ++ d = d + CAIRO_DOUBLE2FIX_MAGIC; ++ ++ return ((cairo_fixed_t *) &d)[iman]; ++} + + cairo_private cairo_fixed_t + _cairo_fixed_from_26_6 (uint32_t i); -- cgit v1.2.3