summaryrefslogtreecommitdiff
path: root/exa/exa_render.c
diff options
context:
space:
mode:
authorTilman Sauerbeck <tilman@code-monkey.de>2007-09-24 22:06:52 +0200
committerTilman Sauerbeck <tilman@code-monkey.de>2007-09-25 16:43:06 +0200
commitae8b4f7dcf1291a2f5a0d0159f3e6089eea0578a (patch)
treeada82ec180d7f6f5073c5172b8c8eea050e43ee9 /exa/exa_render.c
parent988f446fe00ac2b92c484a4440613dd82191eadd (diff)
EXA: Added pitch limitations.
Drivers can now specify the max pitches that the accelerator supports.
Diffstat (limited to 'exa/exa_render.c')
-rw-r--r--exa/exa_render.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/exa/exa_render.c b/exa/exa_render.c
index 943a4c8f6..4c931283e 100644
--- a/exa/exa_render.c
+++ b/exa/exa_render.c
@@ -336,24 +336,28 @@ exaTryDriverComposite(CARD8 op,
int nbox;
int src_off_x, src_off_y, mask_off_x, mask_off_y, dst_off_x, dst_off_y;
PixmapPtr pSrcPix, pMaskPix = NULL, pDstPix;
+ ExaPixmapPrivPtr pSrcExaPix, pMaskExaPix = NULL, pDstExaPix;
struct _Pixmap scratch;
ExaMigrationRec pixmaps[3];
pSrcPix = exaGetDrawablePixmap(pSrc->pDrawable);
+ pSrcExaPix = ExaGetPixmapPriv(pSrcPix);
+
pDstPix = exaGetDrawablePixmap(pDst->pDrawable);
- if (pMask)
+ pDstExaPix = ExaGetPixmapPriv(pDstPix);
+
+ if (pMask) {
pMaskPix = exaGetDrawablePixmap(pMask->pDrawable);
+ pMaskExaPix = ExaGetPixmapPriv(pMaskPix);
+ }
- /* 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.
+ /* Check whether the accelerator can use these pixmaps.
+ * FIXME: If it cannot, use temporary pixmaps so that the drawing
+ * happens within limits.
*/
- 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)))
+ if (pSrcExaPix->accel_blocked ||
+ pDstExaPix->accel_blocked ||
+ (pMask && (pMaskExaPix->accel_blocked)))
{
return -1;
}