[oe-commits] Koen Kooi : cairo 1.8.10: use proper patch to get rid of DP FP math

git version control git at git.openembedded.org
Wed Jun 2 15:11:48 UTC 2010


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 7c9ff232dd8522d8d650a6000bf119da99b974db
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=7c9ff232dd8522d8d650a6000bf119da99b974db

Author: Koen Kooi <koen at openembedded.org>
Date:   Wed Jun  2 17:10:43 2010 +0200

cairo 1.8.10: use proper patch to get rid of DP FP math

---

 recipes/cairo/cairo_1.8.10.bb                      |    2 +-
 ...ss-on-DP-FPU-for-common-matrix-test-funcs.patch |   85 +++++++++++++-------
 2 files changed, 56 insertions(+), 31 deletions(-)

diff --git a/recipes/cairo/cairo_1.8.10.bb b/recipes/cairo/cairo_1.8.10.bb
index ad0dae5..ebbef70 100644
--- a/recipes/cairo/cairo_1.8.10.bb
+++ b/recipes/cairo/cairo_1.8.10.bb
@@ -1,6 +1,6 @@
 require cairo.inc
 
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "http://cairographics.org/releases/cairo-${PV}.tar.gz;name=cairo \
            file://dolt-fix.patch \
diff --git a/recipes/cairo/files/0001-Rely-less-on-DP-FPU-for-common-matrix-test-funcs.patch b/recipes/cairo/files/0001-Rely-less-on-DP-FPU-for-common-matrix-test-funcs.patch
index 4e9f1db..c54da08 100644
--- a/recipes/cairo/files/0001-Rely-less-on-DP-FPU-for-common-matrix-test-funcs.patch
+++ b/recipes/cairo/files/0001-Rely-less-on-DP-FPU-for-common-matrix-test-funcs.patch
@@ -1,44 +1,69 @@
-diff a/src/cairo-matrix.c b/src/cairo-matrix.c
+From 940c62bd51d498d5cdc7d8b1b8aecd750d1094ef Mon Sep 17 00:00:00 2001
+From: Jonathan Morton <jonathan.morton at movial.com>
+Date: Wed, 2 Jun 2010 13:58:31 +0300
+Subject: [PATCH] Rely less on DP FPU for common matrix funcs.
+
+---
+ src/cairo-matrix.c |   20 ++++++++++----------
+ 1 files changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/src/cairo-matrix.c b/src/cairo-matrix.c
+index de1c6ed..3aec9e5 100644
 --- a/src/cairo-matrix.c
 +++ b/src/cairo-matrix.c
-@@ -653,16 +653,39 @@ _cairo_matrix_compute_basis_scale_factors (const cairo_matrix_t *matrix,
+@@ -43,6 +43,13 @@
+ #define ISFINITE(x) ((x) * (x) >= 0.) /* check for NaNs */
+ #endif
+ 
++static const cairo_matrix_t
++_cairo_matrix_identity = {
++	.xx = 1,	.xy = 0,
++	.yx = 0,	.yy = 1,
++	.x0 = 0,	.y0 = 0
++};
++
+ static void
+ _cairo_matrix_scalar_multiply (cairo_matrix_t *matrix, double scalar);
+ 
+@@ -58,10 +65,7 @@ _cairo_matrix_compute_adjoint (cairo_matrix_t *matrix);
+ void
+ cairo_matrix_init_identity (cairo_matrix_t *matrix)
+ {
+-    cairo_matrix_init (matrix,
+-		       1, 0,
+-		       0, 1,
+-		       0, 0);
++	*matrix = _cairo_matrix_identity;
+ }
+ slim_hidden_def(cairo_matrix_init_identity);
+ 
+@@ -86,7 +90,6 @@ slim_hidden_def(cairo_matrix_init_identity);
+ void
+ cairo_matrix_init (cairo_matrix_t *matrix,
+ 		   double xx, double yx,
+-
+ 		   double xy, double yy,
+ 		   double x0, double y0)
+ {
+@@ -653,16 +656,13 @@ _cairo_matrix_compute_basis_scale_factors (const cairo_matrix_t *matrix,
  cairo_bool_t
  _cairo_matrix_is_identity (const cairo_matrix_t *matrix)
  {
-+	static const cairo_matrix_t id = {
-+		.xx = 1,
-+		.xy = 0,
-+		.yx = 0,
-+		.yy = 1,
-+		.x0 = 0,
-+		.y0 = 0
-+	};
-+
-+	return !memcmp(matrix, &id, sizeof(id));
-+
-+#if 0
-     return (matrix->xx == 1.0 && matrix->yx == 0.0 &&
- 	    matrix->xy == 0.0 && matrix->yy == 1.0 &&
- 	    matrix->x0 == 0.0 && matrix->y0 == 0.0);
-+#endif
+-    return (matrix->xx == 1.0 && matrix->yx == 0.0 &&
+-	    matrix->xy == 0.0 && matrix->yy == 1.0 &&
+-	    matrix->x0 == 0.0 && matrix->y0 == 0.0);
++	return !memcmp(matrix, &_cairo_matrix_identity, sizeof(cairo_matrix_t));
  }
  
  cairo_bool_t
  _cairo_matrix_is_translation (const cairo_matrix_t *matrix)
  {
-+	cairo_matrix_t tmp;
-+	tmp.xx = matrix->xx;
-+	tmp.xy = matrix->xy;
-+	tmp.yx = matrix->yx;
-+	tmp.yy = matrix->yy;
-+	tmp.x0 = tmp.y0 = 0;
-+	return _cairo_matrix_is_identity(&tmp);
-+
-+#if 0
-     return (matrix->xx == 1.0 && matrix->yx == 0.0 &&
- 	    matrix->xy == 0.0 && matrix->yy == 1.0);
-+#endif
+-    return (matrix->xx == 1.0 && matrix->yx == 0.0 &&
+-	    matrix->xy == 0.0 && matrix->yy == 1.0);
++	return !memcmp(matrix, &_cairo_matrix_identity, sizeof(double)*4);
  }
  
  cairo_bool_t
+-- 
+1.5.6.1
 





More information about the Openembedded-commits mailing list