From 85f46e0bcdf60d145a6868ee71d10688c9113e6e Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 17 May 2004 07:14:23 +0000 Subject: [PATCH] Add new CheckComposite hook. This allows a driver to avoid the migration of pixmaps for a Composite operation if the operation can't be supported. This hook is optional. --- hw/kdrive/src/kaapict.c | 5 +++++ hw/kdrive/src/kdrive.h | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/hw/kdrive/src/kaapict.c b/hw/kdrive/src/kaapict.c index cca0d466e..5c4696dec 100644 --- a/hw/kdrive/src/kaapict.c +++ b/hw/kdrive/src/kaapict.c @@ -426,6 +426,11 @@ kaaTryDriverComposite(CARD8 op, width, height)) return 1; + if (pKaaScr->info->CheckComposite && + !(*pKaaScr->info->CheckComposite) (op, pSrc, pMask, pDst)) + { + return -1; + } if (pSrc->pDrawable->type == DRAWABLE_PIXMAP) kaaPixmapUseScreen ((PixmapPtr) pSrc->pDrawable); diff --git a/hw/kdrive/src/kdrive.h b/hw/kdrive/src/kdrive.h index 7981c7e54..8dc6606ef 100644 --- a/hw/kdrive/src/kdrive.h +++ b/hw/kdrive/src/kdrive.h @@ -348,6 +348,10 @@ typedef struct _KaaScreenInfo { int height); void (*DoneBlend) (void); + Bool (*CheckComposite) (int op, + PicturePtr pSrcPicture, + PicturePtr pMaskPicture, + PicturePtr pDstPicture); Bool (*PrepareComposite) (int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture,