From d6d5581d5fba846c8476ad4d593da662306765d7 Mon Sep 17 00:00:00 2001 From: marha Date: Sat, 25 Oct 2014 19:53:22 +0200 Subject: libXft mesa xserver pixman xkeyboard-config git update 25 Oct 2014 xserver commit 16a32c53f6e9ad1f3284d4596edfa33e9efb740e xkeyboard-config commit 0d4c3d9d891536aa1ec4f1fff5e3df51cfd2718d pixman commit 594e6a6c93e92fcfb495e987aec5617f6c37f467 libXft commit e8a83226bc10afb587f6f34daac44d2ef809c85e mesa commit 13862812dc910a4ef57cb72cb9fe777ce3c14515 --- xorg-server/render/mipict.c | 34 +++++++--------------------------- 1 file changed, 7 insertions(+), 27 deletions(-) (limited to 'xorg-server/render/mipict.c') diff --git a/xorg-server/render/mipict.c b/xorg-server/render/mipict.c index 3959fc415..a72510480 100644 --- a/xorg-server/render/mipict.c +++ b/xorg-server/render/mipict.c @@ -49,23 +49,9 @@ miDestroyPicture(PicturePtr pPicture) void miDestroyPictureClip(PicturePtr pPicture) { - switch (pPicture->clientClipType) { - case CT_NONE: - return; - case CT_PIXMAP: - (*pPicture->pDrawable->pScreen-> - DestroyPixmap) ((PixmapPtr) (pPicture->clientClip)); - break; - default: - /* - * we know we'll never have a list of rectangles, since ChangeClip - * immediately turns them into a region - */ + if (pPicture->clientClip) RegionDestroy(pPicture->clientClip); - break; - } pPicture->clientClip = NULL; - pPicture->clientClipType = CT_NONE; } int @@ -73,37 +59,31 @@ miChangePictureClip(PicturePtr pPicture, int type, void *value, int n) { ScreenPtr pScreen = pPicture->pDrawable->pScreen; PictureScreenPtr ps = GetPictureScreen(pScreen); - void *clientClip; - int clientClipType; + RegionPtr clientClip; switch (type) { case CT_PIXMAP: /* convert the pixmap to a region */ - clientClip = (void *) BitmapToRegion(pScreen, (PixmapPtr) value); + clientClip = BitmapToRegion(pScreen, (PixmapPtr) value); if (!clientClip) return BadAlloc; - clientClipType = CT_REGION; (*pScreen->DestroyPixmap) ((PixmapPtr) value); break; case CT_REGION: clientClip = value; - clientClipType = CT_REGION; break; case CT_NONE: clientClip = 0; - clientClipType = CT_NONE; break; default: - clientClip = (void *) RegionFromRects(n, (xRectangle *) value, type); + clientClip = RegionFromRects(n, (xRectangle *) value, type); if (!clientClip) return BadAlloc; - clientClipType = CT_REGION; free(value); break; } (*ps->DestroyPictureClip) (pPicture); pPicture->clientClip = clientClip; - pPicture->clientClipType = clientClipType; pPicture->stateChanges |= CPClipMask; return Success; } @@ -144,7 +124,7 @@ miValidatePicture(PicturePtr pPicture, Mask mask) * copying of regions. (this wins especially if many clients clip * by children and have no client clip.) */ - if (pPicture->clientClipType == CT_NONE) { + if (!pPicture->clientClip) { if (freeCompClip) RegionDestroy(pPicture->pCompositeClip); pPicture->pCompositeClip = pregWin; @@ -203,7 +183,7 @@ miValidatePicture(PicturePtr pPicture, Mask mask) pPicture->pCompositeClip = RegionCreate(&pixbounds, 1); } - if (pPicture->clientClipType == CT_REGION) { + if (pPicture->clientClip) { if (pDrawable->x || pDrawable->y) { RegionTranslate(pPicture->clientClip, pDrawable->x + pPicture->clipOrigin.x, @@ -284,7 +264,7 @@ miClipPictureReg(pixman_region16_t * pRegion, static inline Bool miClipPictureSrc(RegionPtr pRegion, PicturePtr pPicture, int dx, int dy) { - if (pPicture->clientClipType != CT_NONE) { + if (pPicture->clientClip) { Bool result; pixman_region_translate(pPicture->clientClip, -- cgit v1.2.3