render: Remove unused fields in the source picture structs
The fields class, stopRange, colorTable and colorTableSize are not used by any current code. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Soren Sandmann <ssp@redhat.com>
This commit is contained in:
parent
b0d84f9439
commit
2b0cabec62
|
@ -843,11 +843,6 @@ static void initGradient(SourcePictPtr pGradient, int stopCount,
|
|||
pGradient->gradient.stops[i].x = stopPoints[i];
|
||||
pGradient->gradient.stops[i].color = stopColors[i];
|
||||
}
|
||||
|
||||
pGradient->gradient.class = SourcePictClassUnknown;
|
||||
pGradient->gradient.stopRange = 0xffff;
|
||||
pGradient->gradient.colorTable = NULL;
|
||||
pGradient->gradient.colorTableSize = 0;
|
||||
}
|
||||
|
||||
static PicturePtr createSourcePicture(void)
|
||||
|
@ -922,8 +917,6 @@ CreateLinearGradientPicture (Picture pid, xPointFixed *p1, xPointFixed *p2,
|
|||
return pPicture;
|
||||
}
|
||||
|
||||
#define FixedToDouble(x) ((x)/65536.)
|
||||
|
||||
PicturePtr
|
||||
CreateRadialGradientPicture (Picture pid, xPointFixed *inner, xPointFixed *outer,
|
||||
xFixed innerRadius, xFixed outerRadius,
|
||||
|
@ -959,12 +952,6 @@ CreateRadialGradientPicture (Picture pid, xPointFixed *inner, xPointFixed *outer
|
|||
radial->c2.x = outer->x;
|
||||
radial->c2.y = outer->y;
|
||||
radial->c2.radius = outerRadius;
|
||||
radial->cdx = (radial->c2.x - radial->c1.x) / 65536.;
|
||||
radial->cdy = (radial->c2.y - radial->c1.y) / 65536.;
|
||||
radial->dr = (radial->c2.radius - radial->c1.radius) / 65536.;
|
||||
radial->A = ( radial->cdx * radial->cdx
|
||||
+ radial->cdy * radial->cdy
|
||||
- radial->dr * radial->dr);
|
||||
|
||||
initGradient(pPicture->pSourcePict, nStops, stops, colors, error);
|
||||
if (*error) {
|
||||
|
|
|
@ -65,13 +65,8 @@ typedef struct pixman_transform PictTransform, *PictTransformPtr;
|
|||
#define SourcePictTypeRadial 2
|
||||
#define SourcePictTypeConical 3
|
||||
|
||||
#define SourcePictClassUnknown 0
|
||||
#define SourcePictClassHorizontal 1
|
||||
#define SourcePictClassVertical 2
|
||||
|
||||
typedef struct _PictSolidFill {
|
||||
unsigned int type;
|
||||
unsigned int class;
|
||||
CARD32 color;
|
||||
} PictSolidFill, *PictSolidFillPtr;
|
||||
|
||||
|
@ -82,22 +77,14 @@ typedef struct _PictGradientStop {
|
|||
|
||||
typedef struct _PictGradient {
|
||||
unsigned int type;
|
||||
unsigned int class;
|
||||
int nstops;
|
||||
PictGradientStopPtr stops;
|
||||
int stopRange;
|
||||
CARD32 *colorTable;
|
||||
int colorTableSize;
|
||||
} PictGradient, *PictGradientPtr;
|
||||
|
||||
typedef struct _PictLinearGradient {
|
||||
unsigned int type;
|
||||
unsigned int class;
|
||||
int nstops;
|
||||
PictGradientStopPtr stops;
|
||||
int stopRange;
|
||||
CARD32 *colorTable;
|
||||
int colorTableSize;
|
||||
xPointFixed p1;
|
||||
xPointFixed p2;
|
||||
} PictLinearGradient, *PictLinearGradientPtr;
|
||||
|
@ -110,28 +97,16 @@ typedef struct _PictCircle {
|
|||
|
||||
typedef struct _PictRadialGradient {
|
||||
unsigned int type;
|
||||
unsigned int class;
|
||||
int nstops;
|
||||
PictGradientStopPtr stops;
|
||||
int stopRange;
|
||||
CARD32 *colorTable;
|
||||
int colorTableSize;
|
||||
PictCircle c1;
|
||||
PictCircle c2;
|
||||
double cdx;
|
||||
double cdy;
|
||||
double dr;
|
||||
double A;
|
||||
} PictRadialGradient, *PictRadialGradientPtr;
|
||||
|
||||
typedef struct _PictConicalGradient {
|
||||
unsigned int type;
|
||||
unsigned int class;
|
||||
int nstops;
|
||||
PictGradientStopPtr stops;
|
||||
int stopRange;
|
||||
CARD32 *colorTable;
|
||||
int colorTableSize;
|
||||
xPointFixed center;
|
||||
xFixed angle;
|
||||
} PictConicalGradient, *PictConicalGradientPtr;
|
||||
|
|
Loading…
Reference in New Issue
Block a user