summaryrefslogtreecommitdiff
path: root/hw/kdrive/src/kaapict.c
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2004-01-08 08:16:24 +0000
committerEric Anholt <anholt@freebsd.org>2004-01-08 08:16:24 +0000
commitb27729ec88f5d4153a0debfe2347bbed022329ba (patch)
tree8594960e3f2f652000d9202ea6648f72a2452162 /hw/kdrive/src/kaapict.c
parentd640cf4cb4e031a0e93dfd5955405847fe4475c0 (diff)
- Add a new UploadToScratch kaa hook for putting the data for a single
pixmap into temporary offscreen storage. Subsequent UploadToScratch may clobber the data of previous ones. This allows hardware acceleration of composite operations on glyphs. - Add a new UploadToScreen kaa hook for doing the actual moving of data to framebuffer. This would allow us to do things like hostdata blits or memcpy to agp and then blit. - Add an UploadToScreen on ATI which is just memcpy, but which will be replaced with a hostdata blit soon. - Add UploadToScratch on ATI and reserve 64k of scratch space. This provided a 3x speedup of rgb24text on my Radeon.
Diffstat (limited to 'hw/kdrive/src/kaapict.c')
-rw-r--r--hw/kdrive/src/kaapict.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/hw/kdrive/src/kaapict.c b/hw/kdrive/src/kaapict.c
index 88bebbf91..d8badbd08 100644
--- a/hw/kdrive/src/kaapict.c
+++ b/hw/kdrive/src/kaapict.c
@@ -319,6 +319,7 @@ kaaTryDriverBlend(CARD8 op,
int nbox;
int src_off_x, src_off_y, dst_off_x, dst_off_y;
PixmapPtr pSrcPix, pDstPix;
+ struct _Pixmap srcScratch;
xDst += pDst->pDrawable->x;
yDst += pDst->pDrawable->y;
@@ -339,7 +340,19 @@ kaaTryDriverBlend(CARD8 op,
pSrcPix = kaaGetOffscreenPixmap (pSrc->pDrawable, &src_off_x, &src_off_y);
pDstPix = kaaGetOffscreenPixmap (pDst->pDrawable, &dst_off_x, &dst_off_y);
- if (!pSrcPix || !pDstPix) {
+
+ if (!pDstPix) {
+ REGION_UNINIT(pDst->pDrawable->pScreen, &region);
+ return 0;
+ }
+
+ if (!pSrcPix && pKaaScr->info->UploadToScratch) {
+ if ((*pKaaScr->info->UploadToScratch) ((PixmapPtr) pSrc->pDrawable,
+ &srcScratch))
+ pSrcPix = &srcScratch;
+ }
+
+ if (!pSrcPix) {
REGION_UNINIT(pDst->pDrawable->pScreen, &region);
return 0;
}