From 67c2a86e59e915d9a5681e9d233478cfea3e51ed Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Tue, 19 Dec 2006 15:44:18 +0100 Subject: EXA: Compare backing pixmaps instead of drawables against driver limits. The driver operations are always contained within the backing pixmaps, it doesn't matter if the drawables are bigger. --- exa/exa_render.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'exa/exa_render.c') diff --git a/exa/exa_render.c b/exa/exa_render.c index 9affb9f11..fd3d87f3d 100644 --- a/exa/exa_render.c +++ b/exa/exa_render.c @@ -336,16 +336,21 @@ exaTryDriverComposite(CARD8 op, struct _Pixmap scratch; ExaMigrationRec pixmaps[3]; + pSrcPix = exaGetDrawablePixmap(pSrc->pDrawable); + pDstPix = exaGetDrawablePixmap(pDst->pDrawable); + if (pMask) + pMaskPix = exaGetDrawablePixmap(pMask->pDrawable); + /* Bail if we might exceed coord limits by rendering from/to these. We * should really be making some scratch pixmaps with offsets and coords * adjusted to deal with this, but it hasn't been done yet. */ - if (pSrc->pDrawable->width > pExaScr->info->maxX || - pSrc->pDrawable->height > pExaScr->info->maxY || - pDst->pDrawable->width > pExaScr->info->maxX || - pDst->pDrawable->height > pExaScr->info->maxY || - (pMask && (pMask->pDrawable->width > pExaScr->info->maxX || - pMask->pDrawable->height > pExaScr->info->maxY))) + if (pSrcPix->drawable.width > pExaScr->info->maxX || + pSrcPix->drawable.height > pExaScr->info->maxY || + pDstPix->drawable.width > pExaScr->info->maxX || + pDstPix->drawable.height > pExaScr->info->maxY || + (pMask && (pMaskPix->drawable.width > pExaScr->info->maxX || + pMaskPix->drawable.height > pExaScr->info->maxY))) { return -1; } -- cgit v1.2.3