diff options
author | Søren Sandmann Pedersen <ssp@redhat.com> | 2011-03-28 20:59:34 -0400 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@redhat.com> | 2011-04-22 21:39:36 -0400 |
commit | b0d84f94393edab395d65d2b2cb983fc9fec3d36 (patch) | |
tree | 74e3c1fc8736827a6e94f38981553b38e78b01bd | |
parent | 61a92a78cd49969f74a046fa26c3199e06365814 (diff) |
render: Delete PictureGradientColor()
PictureGradientColor(), INTERPOLATE_PIXEL_256() and premultiply() are
not used by anything.
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Soren Sandmann <ssp@redhat.com>
-rw-r--r-- | render/picture.c | 45 | ||||
-rw-r--r-- | render/picturestr.h | 5 |
2 files changed, 0 insertions, 50 deletions
diff --git a/render/picture.c b/render/picture.c index e7e1f2b41..058db2b72 100644 --- a/render/picture.c +++ b/render/picture.c @@ -811,51 +811,6 @@ static CARD32 xRenderColorToCard32(xRenderColor c) (c.blue >> 8); } -static unsigned int premultiply(unsigned int x) -{ - unsigned int a = x >> 24; - unsigned int t = (x & 0xff00ff) * a + 0x800080; - t = (t + ((t >> 8) & 0xff00ff)) >> 8; - t &= 0xff00ff; - - x = ((x >> 8) & 0xff) * a + 0x80; - x = (x + ((x >> 8) & 0xff)); - x &= 0xff00; - x |= t | (a << 24); - return x; -} - -static unsigned int INTERPOLATE_PIXEL_256(unsigned int x, unsigned int a, - unsigned int y, unsigned int b) -{ - CARD32 t = (x & 0xff00ff) * a + (y & 0xff00ff) * b; - t >>= 8; - t &= 0xff00ff; - - x = ((x >> 8) & 0xff00ff) * a + ((y >> 8) & 0xff00ff) * b; - x &= 0xff00ff00; - x |= t; - return x; -} - -CARD32 -PictureGradientColor (PictGradientStopPtr stop1, - PictGradientStopPtr stop2, - CARD32 x) -{ - CARD32 current_color, next_color; - int dist, idist; - - current_color = xRenderColorToCard32 (stop1->color); - next_color = xRenderColorToCard32 (stop2->color); - - dist = (int) (256 * (x - stop1->x) / (stop2->x - stop1->x)); - idist = 256 - dist; - - return premultiply (INTERPOLATE_PIXEL_256 (current_color, idist, - next_color, dist)); -} - static void initGradient(SourcePictPtr pGradient, int stopCount, xFixed *stopPoints, xRenderColor *stopColors, int *error) { diff --git a/render/picturestr.h b/render/picturestr.h index 7c7edb1c4..8b387f7d9 100644 --- a/render/picturestr.h +++ b/render/picturestr.h @@ -614,11 +614,6 @@ CompositeTriFan (CARD8 op, int npoints, xPointFixed *points); -extern _X_EXPORT CARD32 -PictureGradientColor (PictGradientStopPtr stop1, - PictGradientStopPtr stop2, - CARD32 x); - extern _X_EXPORT void RenderExtensionInit (void); Bool |