Delete unused fbWalkCompositeRegion()
This function has not been used since most of the compositing was moved to pixman. The only reason it has survived until now is that it was part of the server ABI. Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Signed-off-by: Søren Sandmann <ssp@redhat.com>
This commit is contained in:
parent
1a0d9324b3
commit
6118346d64
106
fb/fbpict.c
106
fb/fbpict.c
|
@ -35,112 +35,6 @@
|
|||
#include "mipict.h"
|
||||
#include "fbpict.h"
|
||||
|
||||
#define mod(a,b) ((b) == 1 ? 0 : (a) >= 0 ? (a) % (b) : (b) - (-a) % (b))
|
||||
|
||||
void
|
||||
fbWalkCompositeRegion (CARD8 op,
|
||||
PicturePtr pSrc,
|
||||
PicturePtr pMask,
|
||||
PicturePtr pDst,
|
||||
INT16 xSrc,
|
||||
INT16 ySrc,
|
||||
INT16 xMask,
|
||||
INT16 yMask,
|
||||
INT16 xDst,
|
||||
INT16 yDst,
|
||||
CARD16 width,
|
||||
CARD16 height,
|
||||
Bool srcRepeat,
|
||||
Bool maskRepeat,
|
||||
CompositeFunc compositeRect)
|
||||
{
|
||||
RegionRec region;
|
||||
int n;
|
||||
BoxPtr pbox;
|
||||
int w, h, w_this, h_this;
|
||||
int x_msk, y_msk, x_src, y_src, x_dst, y_dst;
|
||||
|
||||
xDst += pDst->pDrawable->x;
|
||||
yDst += pDst->pDrawable->y;
|
||||
if (pSrc->pDrawable)
|
||||
{
|
||||
xSrc += pSrc->pDrawable->x;
|
||||
ySrc += pSrc->pDrawable->y;
|
||||
}
|
||||
if (pMask && pMask->pDrawable)
|
||||
{
|
||||
xMask += pMask->pDrawable->x;
|
||||
yMask += pMask->pDrawable->y;
|
||||
}
|
||||
|
||||
if (!miComputeCompositeRegion (®ion, pSrc, pMask, pDst, xSrc, ySrc,
|
||||
xMask, yMask, xDst, yDst, width, height))
|
||||
return;
|
||||
|
||||
n = RegionNumRects (®ion);
|
||||
pbox = RegionRects (®ion);
|
||||
while (n--)
|
||||
{
|
||||
h = pbox->y2 - pbox->y1;
|
||||
y_src = pbox->y1 - yDst + ySrc;
|
||||
y_msk = pbox->y1 - yDst + yMask;
|
||||
y_dst = pbox->y1;
|
||||
while (h)
|
||||
{
|
||||
h_this = h;
|
||||
w = pbox->x2 - pbox->x1;
|
||||
x_src = pbox->x1 - xDst + xSrc;
|
||||
x_msk = pbox->x1 - xDst + xMask;
|
||||
x_dst = pbox->x1;
|
||||
if (maskRepeat)
|
||||
{
|
||||
y_msk = mod (y_msk - pMask->pDrawable->y, pMask->pDrawable->height);
|
||||
if (h_this > pMask->pDrawable->height - y_msk)
|
||||
h_this = pMask->pDrawable->height - y_msk;
|
||||
y_msk += pMask->pDrawable->y;
|
||||
}
|
||||
if (srcRepeat)
|
||||
{
|
||||
y_src = mod (y_src - pSrc->pDrawable->y, pSrc->pDrawable->height);
|
||||
if (h_this > pSrc->pDrawable->height - y_src)
|
||||
h_this = pSrc->pDrawable->height - y_src;
|
||||
y_src += pSrc->pDrawable->y;
|
||||
}
|
||||
while (w)
|
||||
{
|
||||
w_this = w;
|
||||
if (maskRepeat)
|
||||
{
|
||||
x_msk = mod (x_msk - pMask->pDrawable->x, pMask->pDrawable->width);
|
||||
if (w_this > pMask->pDrawable->width - x_msk)
|
||||
w_this = pMask->pDrawable->width - x_msk;
|
||||
x_msk += pMask->pDrawable->x;
|
||||
}
|
||||
if (srcRepeat)
|
||||
{
|
||||
x_src = mod (x_src - pSrc->pDrawable->x, pSrc->pDrawable->width);
|
||||
if (w_this > pSrc->pDrawable->width - x_src)
|
||||
w_this = pSrc->pDrawable->width - x_src;
|
||||
x_src += pSrc->pDrawable->x;
|
||||
}
|
||||
(*compositeRect) (op, pSrc, pMask, pDst,
|
||||
x_src, y_src, x_msk, y_msk, x_dst, y_dst,
|
||||
w_this, h_this);
|
||||
w -= w_this;
|
||||
x_src += w_this;
|
||||
x_msk += w_this;
|
||||
x_dst += w_this;
|
||||
}
|
||||
h -= h_this;
|
||||
y_src += h_this;
|
||||
y_msk += h_this;
|
||||
y_dst += h_this;
|
||||
}
|
||||
pbox++;
|
||||
}
|
||||
RegionUninit(®ion);
|
||||
}
|
||||
|
||||
void
|
||||
fbComposite (CARD8 op,
|
||||
PicturePtr pSrc,
|
||||
|
|
17
fb/fbpict.h
17
fb/fbpict.h
|
@ -442,23 +442,6 @@ typedef void (*CompositeFunc) (CARD8 op,
|
|||
CARD16 width,
|
||||
CARD16 height);
|
||||
|
||||
extern _X_EXPORT void
|
||||
fbWalkCompositeRegion (CARD8 op,
|
||||
PicturePtr pSrc,
|
||||
PicturePtr pMask,
|
||||
PicturePtr pDst,
|
||||
INT16 xSrc,
|
||||
INT16 ySrc,
|
||||
INT16 xMask,
|
||||
INT16 yMask,
|
||||
INT16 xDst,
|
||||
INT16 yDst,
|
||||
CARD16 width,
|
||||
CARD16 height,
|
||||
Bool srcRepeat,
|
||||
Bool maskRepeat,
|
||||
CompositeFunc compositeRect);
|
||||
|
||||
/* fbtrap.c */
|
||||
|
||||
extern _X_EXPORT void
|
||||
|
|
|
@ -179,7 +179,6 @@
|
|||
#define fbUnmapWindow wfbUnmapWindow
|
||||
#define fbUnrealizeFont wfbUnrealizeFont
|
||||
#define fbValidateGC wfbValidateGC
|
||||
#define fbWalkCompositeRegion wfbWalkCompositeRegion
|
||||
#define fbWinPrivateKeyRec wfbWinPrivateKeyRec
|
||||
#define fbZeroLine wfbZeroLine
|
||||
#define fbZeroSegment wfbZeroSegment
|
||||
|
|
Loading…
Reference in New Issue
Block a user