summaryrefslogtreecommitdiff
path: root/exa/exa_render.c
diff options
context:
space:
mode:
Diffstat (limited to 'exa/exa_render.c')
-rw-r--r--exa/exa_render.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/exa/exa_render.c b/exa/exa_render.c
index d46930130..1c1856610 100644
--- a/exa/exa_render.c
+++ b/exa/exa_render.c
@@ -263,26 +263,27 @@ exaTryDriverSolidFill(PicturePtr pSrc,
{
return -1;
}
xDst += pDst->pDrawable->x;
yDst += pDst->pDrawable->y;
+ if (pSrc->pDrawable) {
+ xSrc += pSrc->pDrawable->x;
+ ySrc += pSrc->pDrawable->y;
+ }
if (!miComputeCompositeRegion (&region, pSrc, NULL, pDst,
xSrc, ySrc, 0, 0, xDst, yDst,
width, height))
return 1;
exaGetDrawableDeltas (pDst->pDrawable, pDstPix, &dst_off_x, &dst_off_y);
REGION_TRANSLATE(pScreen, &region, dst_off_x, dst_off_y);
if (pSrc->pDrawable) {
- xSrc += pSrc->pDrawable->x;
- ySrc += pSrc->pDrawable->y;
-
pSrcPix = exaGetDrawablePixmap (pSrc->pDrawable);
pixel = exaGetPixmapFirstPixel (pSrcPix);
} else
pixel = pSrc->pSourcePict->solidFill.color;
if (!exaGetRGBAFromPixel(pixel, &red, &green, &blue, &alpha,
@@ -337,13 +338,14 @@ exaTryDriverCompositeRects(CARD8 op,
PicturePtr pMask,
PicturePtr pDst,
int nrect,
ExaCompositeRectPtr rects)
{
ExaScreenPriv (pDst->pDrawable->pScreen);
- int src_off_x, src_off_y, mask_off_x, mask_off_y, dst_off_x, dst_off_y;
+ int src_off_x = 0, src_off_y = 0, mask_off_x = 0, mask_off_y = 0;
+ int dst_off_x, dst_off_y;
PixmapPtr pSrcPix = NULL, pMaskPix = NULL, pDstPix;
ExaPixmapPrivPtr pSrcExaPix = NULL, pMaskExaPix = NULL, pDstExaPix;
if (!pExaScr->info->PrepareComposite)
return -1;
@@ -653,13 +655,13 @@ exaTryDriverComposite(CARD8 op,
/* Check whether the accelerator can use these pixmaps.
* FIXME: If it cannot, use temporary pixmaps so that the drawing
* happens within limits.
*/
if (pDstExaPix->accel_blocked ||
(pSrcExaPix && pSrcExaPix->accel_blocked) ||
- (pMask && (pMaskExaPix->accel_blocked)))
+ (pMaskExaPix && (pMaskExaPix->accel_blocked)))
{
return -1;
}
xDst += pDst->pDrawable->x;
yDst += pDst->pDrawable->y;