[PATCH 09/22] render: Remove unused CopyPicture
Adam Jackson
ajax at redhat.com
Tue Jul 22 08:46:29 PDT 2014
Arguably this would be useful API, but it's never called, and a careful
reading of the CPClipMask path reveals that callers would be fairly
disappointed.
Signed-off-by: Adam Jackson <ajax at redhat.com>
---
render/picture.c | 81 -----------------------------------------------------
render/picturestr.h | 3 --
2 files changed, 84 deletions(-)
diff --git a/render/picture.c b/render/picture.c
index 7da9310..58535d4 100644
--- a/render/picture.c
+++ b/render/picture.c
@@ -1332,87 +1332,6 @@ SetPictureTransform(PicturePtr pPicture, PictTransform * transform)
return Success;
}
-void
-CopyPicture(PicturePtr pSrc, Mask mask, PicturePtr pDst)
-{
- PictureScreenPtr ps = GetPictureScreen(pSrc->pDrawable->pScreen);
- Mask origMask = mask;
-
- pDst->serialNumber |= GC_CHANGE_SERIAL_BIT;
- pDst->stateChanges |= mask;
-
- while (mask) {
- Mask bit = lowbit(mask);
-
- switch (bit) {
- case CPRepeat:
- pDst->repeat = pSrc->repeat;
- pDst->repeatType = pSrc->repeatType;
- break;
- case CPAlphaMap:
- if (pSrc->alphaMap &&
- pSrc->alphaMap->pDrawable->type == DRAWABLE_PIXMAP)
- pSrc->alphaMap->refcnt++;
- if (pDst->alphaMap)
- FreePicture((void *) pDst->alphaMap, (XID) 0);
- pDst->alphaMap = pSrc->alphaMap;
- break;
- case CPAlphaXOrigin:
- pDst->alphaOrigin.x = pSrc->alphaOrigin.x;
- break;
- case CPAlphaYOrigin:
- pDst->alphaOrigin.y = pSrc->alphaOrigin.y;
- break;
- case CPClipXOrigin:
- pDst->clipOrigin.x = pSrc->clipOrigin.x;
- break;
- case CPClipYOrigin:
- pDst->clipOrigin.y = pSrc->clipOrigin.y;
- break;
- case CPClipMask:
- switch (pSrc->clientClipType) {
- case CT_NONE:
- (*ps->ChangePictureClip) (pDst, CT_NONE, NULL, 0);
- break;
- case CT_REGION:
- if (!pSrc->clientClip) {
- (*ps->ChangePictureClip) (pDst, CT_NONE, NULL, 0);
- }
- else {
- RegionPtr clientClip;
- RegionPtr srcClientClip = (RegionPtr) pSrc->clientClip;
-
- clientClip = RegionCreate(RegionExtents(srcClientClip),
- RegionNumRects(srcClientClip));
- (*ps->ChangePictureClip) (pDst, CT_REGION, clientClip, 0);
- }
- break;
- default:
- /* XXX: CT_PIXMAP unimplemented */
- break;
- }
- break;
- case CPGraphicsExposure:
- pDst->graphicsExposures = pSrc->graphicsExposures;
- break;
- case CPPolyEdge:
- pDst->polyEdge = pSrc->polyEdge;
- break;
- case CPPolyMode:
- pDst->polyMode = pSrc->polyMode;
- break;
- case CPDither:
- break;
- case CPComponentAlpha:
- pDst->componentAlpha = pSrc->componentAlpha;
- break;
- }
- mask &= ~bit;
- }
-
- (*ps->ChangePicture) (pDst, origMask);
-}
-
static void
ValidateOnePicture(PicturePtr pPicture)
{
diff --git a/render/picturestr.h b/render/picturestr.h
index 8c8100d..1278f62 100644
--- a/render/picturestr.h
+++ b/render/picturestr.h
@@ -476,9 +476,6 @@ extern _X_EXPORT int
SetPictureTransform(PicturePtr pPicture, PictTransform * transform);
extern _X_EXPORT void
- CopyPicture(PicturePtr pSrc, Mask mask, PicturePtr pDst);
-
-extern _X_EXPORT void
ValidatePicture(PicturePtr pPicture);
extern _X_EXPORT int
--
1.9.3
More information about the xorg-devel
mailing list