mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 16:58:01 +02:00
pixman: Remove unused code to quiet compiler warnings
This commit is contained in:
parent
636cbe5a19
commit
621ebc4726
2 changed files with 0 additions and 80 deletions
|
|
@ -72,20 +72,6 @@ fbIn (CARD32 x, CARD8 y)
|
|||
return m|n|o|p;
|
||||
}
|
||||
|
||||
static CARD32
|
||||
fbIn24 (CARD32 x, CARD8 y)
|
||||
{
|
||||
CARD16 a = y;
|
||||
CARD16 t;
|
||||
CARD32 m,n,o,p;
|
||||
|
||||
m = FbInU(x,0,a,t);
|
||||
n = FbInU(x,8,a,t);
|
||||
o = FbInU(x,16,a,t);
|
||||
p = (y << 24);
|
||||
return m|n|o|p;
|
||||
}
|
||||
|
||||
#define genericCombine24(a,b,c,d) (((a)*(c)+(b)*(d)))
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -154,72 +154,6 @@ pixman_gradient_color (pixman_gradient_stop_t *stop1,
|
|||
next_color, dist));
|
||||
}
|
||||
|
||||
static int
|
||||
pixman_init_gradient_color_table (pixman_gradient_image_t *gradient,
|
||||
int tableSize)
|
||||
{
|
||||
int begin_pos, end_pos;
|
||||
xFixed incr, dpos;
|
||||
int pos, current_stop;
|
||||
pixman_gradient_stop_t *stops = gradient->stops;
|
||||
int nstops = gradient->nstops;
|
||||
|
||||
if (gradient->colorTableSize < tableSize)
|
||||
{
|
||||
uint32_t *newColorTable;
|
||||
|
||||
newColorTable = realloc (gradient->colorTable,
|
||||
tableSize * sizeof (uint32_t));
|
||||
if (!newColorTable)
|
||||
return 1;
|
||||
|
||||
gradient->colorTable = newColorTable;
|
||||
gradient->colorTableSize = tableSize;
|
||||
}
|
||||
|
||||
gradient->stopRange = tableSize;
|
||||
|
||||
/* The position where the gradient begins and ends */
|
||||
begin_pos = (stops[0].x * gradient->colorTableSize) >> 16;
|
||||
end_pos = (stops[nstops - 1].x * gradient->colorTableSize) >> 16;
|
||||
|
||||
pos = 0; /* The position in the color table. */
|
||||
|
||||
/* Up to first point */
|
||||
while (pos <= begin_pos) {
|
||||
gradient->colorTable[pos] = xRenderColorToCard32(stops[0].color);
|
||||
++pos;
|
||||
}
|
||||
|
||||
incr = (1<<16)/ gradient->colorTableSize; /* the double increment. */
|
||||
dpos = incr * pos; /* The position in terms of 0-1. */
|
||||
|
||||
current_stop = 0; /* We always interpolate between current and current + 1. */
|
||||
|
||||
/* Gradient area */
|
||||
while (pos < end_pos) {
|
||||
gradient->colorTable[pos] =
|
||||
pixman_gradient_color (&stops[current_stop],
|
||||
&stops[current_stop + 1],
|
||||
dpos);
|
||||
|
||||
++pos;
|
||||
dpos += incr;
|
||||
|
||||
if (dpos > stops[current_stop + 1].x)
|
||||
++current_stop;
|
||||
}
|
||||
|
||||
/* After last point */
|
||||
while (pos < gradient->colorTableSize) {
|
||||
gradient->colorTable[pos] =
|
||||
xRenderColorToCard32 (stops[nstops - 1].color);
|
||||
++pos;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
_pixman_init_gradient (pixman_gradient_image_t *gradient,
|
||||
const pixman_gradient_stop_t *stops,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue