summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <ssp@redhat.com>2011-03-29 00:07:44 -0400
committerSøren Sandmann Pedersen <ssp@redhat.com>2011-04-22 21:39:36 -0400
commit2b0cabec620f3a2a5e431052441b092ef979bf94 (patch)
tree4b3fdee3c91c1bd66656b84b9505dddbcd8e192e /render
parentb0d84f94393edab395d65d2b2cb983fc9fec3d36 (diff)
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>
Diffstat (limited to 'render')
-rw-r--r--render/picture.c13
-rw-r--r--render/picturestr.h25
2 files changed, 0 insertions, 38 deletions
diff --git a/render/picture.c b/render/picture.c
index 058db2b72..49e83ed05 100644
--- a/render/picture.c
+++ b/render/picture.c
@@ -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) {
diff --git a/render/picturestr.h b/render/picturestr.h
index 8b387f7d9..c536c38e6 100644
--- a/render/picturestr.h
+++ b/render/picturestr.h
@@ -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;