diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2008-09-19 10:54:13 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2008-09-19 14:31:33 +0100 |
commit | 9930eefbbd4448d598faff12fc0f7127555c8c94 (patch) | |
tree | 581b7628bf9c2fd8c9259bf6a942c155020b5485 /src/cairo-slope.c | |
parent | 27ee8dd9c64ac0fd36ce7b58729ee732e3396ee1 (diff) | |
download | cairo-9930eefbbd4448d598faff12fc0f7127555c8c94.tar.gz |
Simple perf tweaks for a rectilinear Hilbert curve.
Some tweaks to avoid stack copies and branches that save ~25% in
_cairo_traps_tessellate_convex_quad().
Diffstat (limited to 'src/cairo-slope.c')
-rw-r--r-- | src/cairo-slope.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cairo-slope.c b/src/cairo-slope.c index d3f0db42e..e3a070b38 100644 --- a/src/cairo-slope.c +++ b/src/cairo-slope.c @@ -37,7 +37,9 @@ #include "cairoint.h" void -_cairo_slope_init (cairo_slope_t *slope, cairo_point_t *a, cairo_point_t *b) +_cairo_slope_init (cairo_slope_t *slope, + const cairo_point_t *a, + const cairo_point_t *b) { slope->dx = b->x - a->x; slope->dy = b->y - a->y; @@ -62,7 +64,7 @@ _cairo_slope_init (cairo_slope_t *slope, cairo_point_t *a, cairo_point_t *b) > 0 => a more positive than b */ int -_cairo_slope_compare (cairo_slope_t *a, cairo_slope_t *b) +_cairo_slope_compare (const cairo_slope_t *a, const cairo_slope_t *b) { cairo_fixed_48_16_t diff; |