Cherry-pick https://gitlab.freedesktop.org/cairo/cairo/-/commit/1904d7bf35099f775d68cb7203a34ac7a4e72514 draft
authorJonathan Kew <jkew@mozilla.com>
Wed, 14 Apr 2021 13:17:08 +0100
changeset 3667300 d77051e91d25a823a479cadacc079dd0cbad2e95
parent 3667299 3e7630189a920ef9bbf8814a7144145742203514
child 3667301 37a494ea546fa48f0e4ecf0a05edf8a4724e6fc6
push id683063
push userjkew@mozilla.com
push dateMon, 19 Apr 2021 13:15:26 +0000
treeherdertry@919daaf50d14 [default view] [failures only]
milestone89.0a1
Cherry-pick https://gitlab.freedesktop.org/cairo/cairo/-/commit/1904d7bf35099f775d68cb7203a34ac7a4e72514 Rename cairo_lines_compare_at_y into _cairo_lines_compare_at_y and fix syntax
gfx/cairo/cairo/src/cairo-bentley-ottmann.c
gfx/cairo/cairo/src/cairo-line-private.h
gfx/cairo/cairo/src/cairo-line.c
gfx/cairo/cairo/src/cairo-traps.c
--- a/gfx/cairo/cairo/src/cairo-bentley-ottmann.c
+++ b/gfx/cairo/cairo/src/cairo-bentley-ottmann.c
@@ -363,17 +363,17 @@ edge_compare_for_y_against_x (const cair
 
 static inline int
 _cairo_bo_sweep_line_compare_edges (const cairo_bo_sweep_line_t	*sweep_line,
 				    const cairo_bo_edge_t	*a,
 				    const cairo_bo_edge_t	*b)
 {
     int cmp;
 
-    cmp = cairo_lines_compare_at_y (&a->edge.line,
+    cmp = _cairo_lines_compare_at_y (&a->edge.line,
 				    &b->edge.line,
 				    sweep_line->current_y);
     if (cmp)
 	    return cmp;
 
     /* We've got two collinear edges now. */
     return b->edge.bottom - a->edge.bottom;
 }
--- a/gfx/cairo/cairo/src/cairo-line-private.h
+++ b/gfx/cairo/cairo/src/cairo-line-private.h
@@ -37,15 +37,15 @@
 
 #include "cairo-types-private.h"
 #include "cairo-error-private.h"
 #include "cairo-compiler-private.h"
 
 CAIRO_BEGIN_DECLS
 
 cairo_private int
-cairo_lines_compare_at_y(const cairo_line_t *a,
+_cairo_lines_compare_at_y (const cairo_line_t *a,
 			 const cairo_line_t *b,
 			 int y);
 
 CAIRO_END_DECLS
 
 #endif /* CAIRO_LINE_PRIVATE_H */
--- a/gfx/cairo/cairo/src/cairo-line.c
+++ b/gfx/cairo/cairo/src/cairo-line.c
@@ -273,17 +273,18 @@ static int bbox_compare (const cairo_lin
 	return -1;
 
     if (amin > bmax)
 	return +1;
 
     return 0;
 }
 
-int cairo_lines_compare_at_y (const cairo_line_t *a,
+int
+_cairo_lines_compare_at_y (const cairo_line_t *a,
 			      const cairo_line_t *b,
 			      int y)
 {
     cairo_slope_t sa, sb;
     int ret;
 
     if (cairo_lines_equal (a, b))
 	return 0;
--- a/gfx/cairo/cairo/src/cairo-traps.c
+++ b/gfx/cairo/cairo/src/cairo-traps.c
@@ -399,17 +399,17 @@ static void add_tri (cairo_traps_t *trap
 		     const cairo_line_t *right)
 {
     if (y2 < y1) {
 	int tmp = y1;
 	y1 = y2;
 	y2 = tmp;
     }
 
-    if (cairo_lines_compare_at_y (left, right, y1) > 0) {
+    if (_cairo_lines_compare_at_y (left, right, y1) > 0) {
 	const cairo_line_t *tmp = left;
 	left = right;
 	right = tmp;
     }
 
     _cairo_traps_add_clipped_trap (traps, y1, y2, left, right);
 }