/*
* Copyright © 2004 Keith Packard
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of Keith Packard not be used in
* advertising or publicity pertaining to distribution of the software without
* specific, written prior permission. Keith Packard makes no
* representations about the suitability of this software for any purpose. It
* is provided "as is" without express or implied warranty.
*
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef rasterize_span
#endif
static void
pixman_edge_t *l,
pixman_edge_t *r,
{
pixman_fixed_t y = t;
for (;;)
{
int lxi;
int rxi;
lx = l->x;
rx = r->x;
#if N_BITS == 1
/* For the non-antialiased case, round the coordinates up, in effect
* sampling the center of the pixel. (The AA case does a similar
* adjustment in RENDER_SAMPLES_X) */
#endif
/* clip X */
if (lx < 0)
lx = 0;
#if N_BITS == 1
#else
/* Use the last pixel of the scanline, covered 100%.
* We can't use the first pixel following the scanline,
* because accessing it could result in a buffer overrun.
*/
#endif
/* Skip empty (or backwards) sections */
{
/* Find pixel bounds for span */
#if N_BITS == 1
{
#ifdef WORDS_BIGENDIAN
# define SCREEN_SHIFT_LEFT(x,n) ((x) << (n))
# define SCREEN_SHIFT_RIGHT(x,n) ((x) >> (n))
#else
# define SCREEN_SHIFT_LEFT(x,n) ((x) >> (n))
# define SCREEN_SHIFT_RIGHT(x,n) ((x) << (n))
#endif
#define LEFT_MASK(x) \
(((x) & 0x1f) ? \
#define RIGHT_MASK(x) \
(((32 - (x)) & 0x1f) ? \
#define MASK_BITS(x,w,l,n,r) { \
n = (w); \
r = RIGHT_MASK ((x) + n); \
l = LEFT_MASK (x); \
if (l) { \
n -= 32 - ((x) & 0x1f); \
if (n < 0) { \
n = 0; \
l &= r; \
r = 0; \
} \
} \
n >>= 5; \
}
int nmiddle;
int x = lxi;
a += x >> 5;
x &= 0x1f;
if (startmask) {
a++;
}
while (nmiddle--)
if (endmask)
}
#else
{
int lxs;
int rxs;
/* Sample coverage for edge pixels */
/* Add coverage across row */
{
}
else
{
int xi;
{
}
}
}
#endif
}
if (y == b)
break;
#if N_BITS > 1
{
y += STEP_Y_SMALL(N_BITS);
}
else
#endif
{
RENDER_EDGE_STEP_BIG (l);
RENDER_EDGE_STEP_BIG (r);
y += STEP_Y_BIG(N_BITS);
}
}
}