summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2014-06-20 12:36:10 -0400
committerAdam Jackson <ajax@redhat.com>2014-07-29 09:52:19 -0400
commitdd0e8491f75afbd72bea17172a042aa45ff7e30b (patch)
treea064ae3108bd3679568993e17166a065834dacac /render
parent578026fcd58d12dd0be4c0976ee5ecf95a9d61f0 (diff)
render: Remove unused CopyPicture
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. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'render')
-rw-r--r--render/picture.c81
-rw-r--r--render/picturestr.h3
2 files changed, 0 insertions, 84 deletions
diff --git a/render/picture.c b/render/picture.c
index 7da93102b..58535d475 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 8c8100d81..1278f620a 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