summaryrefslogtreecommitdiff
path: root/source/fitz/draw-edgebuffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/fitz/draw-edgebuffer.c')
-rw-r--r--source/fitz/draw-edgebuffer.c82
1 files changed, 41 insertions, 41 deletions
diff --git a/source/fitz/draw-edgebuffer.c b/source/fitz/draw-edgebuffer.c
index 83e77d44..b56f6e25 100644
--- a/source/fitz/draw-edgebuffer.c
+++ b/source/fitz/draw-edgebuffer.c
@@ -413,12 +413,12 @@ static void fz_insert_edgebuffer(fz_context *ctx, fz_rasterizer *ras, float fsx,
}
static inline void
-cursor_output(fz_edgebuffer * restrict eb, int rev, int iy)
+cursor_output(fz_edgebuffer * FZ_RESTRICT eb, int rev, int iy)
{
int *row;
int count;
int height = eb->super.clip.y1 - eb->super.clip.y0;
- cursor_t * restrict cr = &eb->cursor[rev];
+ cursor_t * FZ_RESTRICT cr = &eb->cursor[rev];
rev &= 1; /* Edge label 0 is forwards, 1 and 2 are reverse */
@@ -455,11 +455,11 @@ cursor_output(fz_edgebuffer * restrict eb, int rev, int iy)
}
static inline void
-cursor_output_inrange(fz_edgebuffer * restrict eb, int rev, int iy)
+cursor_output_inrange(fz_edgebuffer * FZ_RESTRICT eb, int rev, int iy)
{
int *row;
int count;
- cursor_t * restrict cr = &eb->cursor[rev];
+ cursor_t * FZ_RESTRICT cr = &eb->cursor[rev];
rev &= 1; /* Edge label 0 is forwards, 1 and 2 are reverse */
@@ -489,9 +489,9 @@ cursor_output_inrange(fz_edgebuffer * restrict eb, int rev, int iy)
/* Step the cursor in y, allowing for maybe crossing a scanline */
static inline void
-cursor_step(fz_edgebuffer * restrict eb, int rev, fixed dy, fixed x)
+cursor_step(fz_edgebuffer * FZ_RESTRICT eb, int rev, fixed dy, fixed x)
{
- cursor_t * restrict cr = &eb->cursor[rev];
+ cursor_t * FZ_RESTRICT cr = &eb->cursor[rev];
int new_iy;
int base = eb->super.clip.y0;
int iy = fixed2int(cr->y) - base;
@@ -512,9 +512,9 @@ cursor_step(fz_edgebuffer * restrict eb, int rev, fixed dy, fixed x)
/* Step the cursor in y, never by enough to cross a scanline. */
static inline void
-cursor_never_step_vertical(fz_edgebuffer * restrict eb, int rev, fixed dy, fixed x)
+cursor_never_step_vertical(fz_edgebuffer * FZ_RESTRICT eb, int rev, fixed dy, fixed x)
{
- cursor_t * restrict cr = &eb->cursor[rev];
+ cursor_t * FZ_RESTRICT cr = &eb->cursor[rev];
assert(fixed2int(cr->y+dy) == fixed2int(cr->y));
@@ -525,9 +525,9 @@ cursor_never_step_vertical(fz_edgebuffer * restrict eb, int rev, fixed dy, fixed
* knowing that we are moving left, and that the right edge
* has already been accounted for. */
static inline void
-cursor_never_step_left(fz_edgebuffer * restrict eb, int rev, fixed dy, fixed x)
+cursor_never_step_left(fz_edgebuffer * FZ_RESTRICT eb, int rev, fixed dy, fixed x)
{
- cursor_t * restrict cr = &eb->cursor[rev];
+ cursor_t * FZ_RESTRICT cr = &eb->cursor[rev];
assert(fixed2int(cr->y+dy) == fixed2int(cr->y));
@@ -540,9 +540,9 @@ cursor_never_step_left(fz_edgebuffer * restrict eb, int rev, fixed dy, fixed x)
* knowing that we are moving right, and that the left edge
* has already been accounted for. */
static inline void
-cursor_never_step_right(fz_edgebuffer * restrict eb, int rev, fixed dy, fixed x)
+cursor_never_step_right(fz_edgebuffer * FZ_RESTRICT eb, int rev, fixed dy, fixed x)
{
- cursor_t * restrict cr = &eb->cursor[rev];
+ cursor_t * FZ_RESTRICT cr = &eb->cursor[rev];
assert(fixed2int(cr->y+dy) == fixed2int(cr->y));
@@ -553,9 +553,9 @@ cursor_never_step_right(fz_edgebuffer * restrict eb, int rev, fixed dy, fixed x)
/* Step the cursor in y, always by enough to cross a scanline. */
static inline void
-cursor_always_step(fz_edgebuffer * restrict eb, int rev, fixed dy, fixed x)
+cursor_always_step(fz_edgebuffer * FZ_RESTRICT eb, int rev, fixed dy, fixed x)
{
- cursor_t * restrict cr = &eb->cursor[rev];
+ cursor_t * FZ_RESTRICT cr = &eb->cursor[rev];
int base = eb->super.clip.y0;
int iy = fixed2int(cr->y) - base;
@@ -569,9 +569,9 @@ cursor_always_step(fz_edgebuffer * restrict eb, int rev, fixed dy, fixed x)
* part of a vertical line, knowing that we are moving from a
* position guaranteed to be in the valid y range. */
static inline void
-cursor_always_step_inrange_vertical(fz_edgebuffer * restrict eb, int rev, fixed dy, fixed x)
+cursor_always_step_inrange_vertical(fz_edgebuffer * FZ_RESTRICT eb, int rev, fixed dy, fixed x)
{
- cursor_t * restrict cr = &eb->cursor[rev];
+ cursor_t * FZ_RESTRICT cr = &eb->cursor[rev];
int base = eb->super.clip.y0;
int iy = fixed2int(cr->y) - base;
@@ -583,9 +583,9 @@ cursor_always_step_inrange_vertical(fz_edgebuffer * restrict eb, int rev, fixed
* part of a left moving line, knowing that we are moving from a
* position guaranteed to be in the valid y range. */
static inline void
-cursor_always_inrange_step_left(fz_edgebuffer * restrict eb, int rev, fixed dy, fixed x)
+cursor_always_inrange_step_left(fz_edgebuffer * FZ_RESTRICT eb, int rev, fixed dy, fixed x)
{
- cursor_t * restrict cr = &eb->cursor[rev];
+ cursor_t * FZ_RESTRICT cr = &eb->cursor[rev];
int base = eb->super.clip.y0;
int iy = fixed2int(cr->y) - base;
@@ -598,9 +598,9 @@ cursor_always_inrange_step_left(fz_edgebuffer * restrict eb, int rev, fixed dy,
* part of a right moving line, knowing that we are moving from a
* position guaranteed to be in the valid y range. */
static inline void
-cursor_always_inrange_step_right(fz_edgebuffer * restrict eb, int rev, fixed dy, fixed x)
+cursor_always_inrange_step_right(fz_edgebuffer * FZ_RESTRICT eb, int rev, fixed dy, fixed x)
{
- cursor_t * restrict cr = &eb->cursor[rev];
+ cursor_t * FZ_RESTRICT cr = &eb->cursor[rev];
int base = eb->super.clip.y0;
int iy = fixed2int(cr->y) - base;
@@ -609,9 +609,9 @@ cursor_always_inrange_step_right(fz_edgebuffer * restrict eb, int rev, fixed dy,
cr->left = x;
}
-static inline void cursor_init(fz_edgebuffer * restrict eb, int rev, fixed y, fixed x)
+static inline void cursor_init(fz_edgebuffer * FZ_RESTRICT eb, int rev, fixed y, fixed x)
{
- cursor_t * restrict cr = &eb->cursor[rev];
+ cursor_t * FZ_RESTRICT cr = &eb->cursor[rev];
assert(y >= int2fixed(eb->super.clip.y0) && y <= int2fixed(eb->super.clip.y1));
@@ -621,39 +621,39 @@ static inline void cursor_init(fz_edgebuffer * restrict eb, int rev, fixed y, fi
cr->d = DIRN_UNSET;
}
-static inline void cursor_left_merge(fz_edgebuffer * restrict eb, int rev, fixed x)
+static inline void cursor_left_merge(fz_edgebuffer * FZ_RESTRICT eb, int rev, fixed x)
{
- cursor_t * restrict cr = &eb->cursor[rev];
+ cursor_t * FZ_RESTRICT cr = &eb->cursor[rev];
if (x < cr->left)
cr->left = x;
}
-static inline void cursor_left(fz_edgebuffer * restrict eb, int rev, fixed x)
+static inline void cursor_left(fz_edgebuffer * FZ_RESTRICT eb, int rev, fixed x)
{
- cursor_t * restrict cr = &eb->cursor[rev];
+ cursor_t * FZ_RESTRICT cr = &eb->cursor[rev];
cr->left = x;
}
-static inline void cursor_right_merge(fz_edgebuffer * restrict eb, int rev, fixed x)
+static inline void cursor_right_merge(fz_edgebuffer * FZ_RESTRICT eb, int rev, fixed x)
{
- cursor_t * restrict cr = &eb->cursor[rev];
+ cursor_t * FZ_RESTRICT cr = &eb->cursor[rev];
if (x > cr->right)
cr->right = x;
}
-static inline void cursor_right(fz_edgebuffer * restrict eb, int rev, fixed x)
+static inline void cursor_right(fz_edgebuffer * FZ_RESTRICT eb, int rev, fixed x)
{
- cursor_t * restrict cr = &eb->cursor[rev];
+ cursor_t * FZ_RESTRICT cr = &eb->cursor[rev];
cr->right = x;
}
-static inline void cursor_down(fz_edgebuffer * restrict eb, int rev, fixed x)
+static inline void cursor_down(fz_edgebuffer * FZ_RESTRICT eb, int rev, fixed x)
{
- cursor_t * restrict cr = &eb->cursor[rev];
+ cursor_t * FZ_RESTRICT cr = &eb->cursor[rev];
int base = eb->super.clip.y0;
if (cr->d == DIRN_UP)
@@ -665,9 +665,9 @@ static inline void cursor_down(fz_edgebuffer * restrict eb, int rev, fixed x)
cr->d = DIRN_DOWN;
}
-static inline void cursor_up(fz_edgebuffer * restrict eb, int rev, fixed x)
+static inline void cursor_up(fz_edgebuffer * FZ_RESTRICT eb, int rev, fixed x)
{
- cursor_t * restrict cr = &eb->cursor[rev];
+ cursor_t * FZ_RESTRICT cr = &eb->cursor[rev];
int base = eb->super.clip.y0;
if (cr->d == DIRN_DOWN)
@@ -698,13 +698,13 @@ static inline int dirns_merge(int d0, int d1)
}
static void
-cursor_flush(fz_edgebuffer * restrict eb)
+cursor_flush(fz_edgebuffer * FZ_RESTRICT eb)
{
int base = eb->super.clip.y0;
int iy0, iy1, iy2;
- cursor_t * restrict cr0 = &eb->cursor[0];
- cursor_t * restrict cr1 = &eb->cursor[1];
- cursor_t * restrict cr2 = &eb->cursor[2];
+ cursor_t * FZ_RESTRICT cr0 = &eb->cursor[0];
+ cursor_t * FZ_RESTRICT cr1 = &eb->cursor[1];
+ cursor_t * FZ_RESTRICT cr2 = &eb->cursor[2];
if (cr0->unset)
{
@@ -919,7 +919,7 @@ static void do_mark_line_app(fz_context *ctx, fz_edgebuffer *eb, fixed sx, fixed
fixed save_ex = ex;
fixed save_ey = ey;
int truncated;
- cursor_t * restrict cr = &eb->cursor[rev];
+ cursor_t * FZ_RESTRICT cr = &eb->cursor[rev];
if (cr->unset)
cr->y = sy, cr->left = sx, cr->right = sx, cr->unset = 0;
@@ -1668,9 +1668,9 @@ static void fz_convert_edgebuffer_app(fz_context *ctx, fz_rasterizer *ras, int e
if (rowlen <= 6) {
int j, k;
for (j = 0; j < rowlen-1; j++) {
- int * restrict t = &row[j<<1];
+ int * FZ_RESTRICT t = &row[j<<1];
for (k = j+1; k < rowlen; k++) {
- int * restrict s = &row[k<<1];
+ int * FZ_RESTRICT s = &row[k<<1];
int tmp;
if (t[0] < s[0])
continue;