evas: Drop duplicate macro definitions SETUP_LINE_*

Summary:
SETUP_LINE_SHALLOW and SETUP_LINE_STEEP are each identically defined
(except whitespace) in evas_line_main.c

Reviewers: cedric, jpeg

Subscribers: jpeg, cedric

Differential Revision: https://phab.enlightenment.org/D4681
This commit is contained in:
Bryce Harrington 2017-02-28 11:41:12 +09:00 committed by Jean-Philippe Andre
parent 82188e12b5
commit b0ecb1fc90
1 changed files with 0 additions and 146 deletions

View File

@ -747,152 +747,6 @@ _draw_render_thread_simple_line(RGBA_Image *dst, int clip_x, int clip_y, int cli
}
}
#define SETUP_LINE_SHALLOW \
if (x0 > x1) \
{ \
EXCHANGE_POINTS(x0, y0, x1, y1); \
dx = -dx; \
dy = -dy; \
} \
\
px = x0; \
py = y0; \
\
p0_in = (IN_RANGE(x0 , y0 , clw, clh) ? 1 : 0); \
p1_in = (IN_RANGE(x1 , y1 , clw, clh) ? 1 : 0); \
\
dely = 1; \
dh = dstw; \
if (dy < 0) \
{ \
dely = -1; \
dh = -dstw; \
} \
\
dyy = ((dy) << 16) / (dx); \
\
if (!p0_in) \
{ \
dxx = ((dx) << 16) / (dy); \
if (px < 0) \
{ \
x = -px; px = 0; \
yy = x * dyy; \
y = yy >> 16; \
if (!a_a) \
y += (yy - (y << 16)) >> 15; \
py += y; \
if ((dely > 0) && (py >= clh)) \
return; \
else if ((dely < 0) && (py < -1)) \
return; \
} \
\
y = 0; \
if ((dely > 0) && (py < 0)) \
y = (-1 - py); \
else if ((dely < 0) && (py >= clh)) \
y = (clh - 1 - py); \
\
xx = y * dxx; \
x = xx >> 16; \
if (!a_a) \
x += (xx - (x << 16)) >> 15; \
px += x; \
if (px >= clw) return; \
\
yy = x * dyy; \
y = yy >> 16; \
if (!a_a) \
y += (yy - (y << 16)) >> 15; \
py += y; \
if ((dely > 0) && (py >= clh)) \
return; \
else if ((dely < 0) && (py < -1)) \
return; \
} \
\
p = data + (dstw * py) + px; \
\
x = px - x0; \
yy = x * dyy; \
prev_y = (yy >> 16); \
\
rx = MIN(x1 + 1, clw); \
by = clh - 1;
#define SETUP_LINE_STEEP \
if (y0 > y1) \
{ \
EXCHANGE_POINTS(x0, y0, x1, y1); \
dx = -dx; \
dy = -dy; \
} \
\
px = x0; \
py = y0; \
\
p0_in = (IN_RANGE(x0 , y0 , clw, clh) ? 1 : 0); \
p1_in = (IN_RANGE(x1 , y1 , clw, clh) ? 1 : 0); \
\
delx = 1; \
if (dx < 0) \
delx = -1; \
\
dxx = ((dx) << 16) / (dy); \
\
if (!p0_in) \
{ \
dyy = ((dy) << 16) / (dx); \
\
if (py < 0) \
{ \
y = -py; py = 0; \
xx = y * dxx; \
x = xx >> 16; \
if (!a_a) \
x += (xx - (x << 16)) >> 15; \
px += x; \
if ((delx > 0) && (px >= clw)) \
return; \
else if ((delx < 0) && (px < -1)) \
return; \
} \
\
x = 0; \
if ((delx > 0) && (px < -1)) \
x = (-1 - px); \
else if ((delx < 0) && (px >= clw)) \
x = (clw - 1 - px); \
\
yy = x * dyy; \
y = yy >> 16; \
if (!a_a) \
y += (yy - (y << 16)) >> 15; \
py += y; \
if (py >= clh) return; \
\
xx = y * dxx; \
x = xx >> 16; \
if (!a_a) \
x += (xx - (x << 16)) >> 15; \
px += x; \
if ((delx > 0) && (px >= clw)) \
return; \
else if ((delx < 0) && (px < -1)) \
return; \
} \
\
p = data + (dstw * py) + px; \
\
y = py - y0; \
xx = y * dxx; \
prev_x = (xx >> 16); \
\
by = MIN(y1 + 1, clh); \
rx = clw - 1;
EAPI void
evas_common_line_draw_line(RGBA_Image *dst, int clip_x, int clip_y, int clip_w, int clip_h, DATA32 color, int render_op, int x0, int y0, int x1, int y1, RGBA_Image *mask_ie, int mask_x, int mask_y)
{