summaryrefslogtreecommitdiff
path: root/hw/kdrive/src/kaa.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/kaa.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/kaa.c')
-rw-r--r--hw/kdrive/src/kaa.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/hw/kdrive/src/kaa.c b/hw/kdrive/src/kaa.c
index a13e258aa..5e67368a8 100644
--- a/hw/kdrive/src/kaa.c
+++ b/hw/kdrive/src/kaa.c
@@ -131,12 +131,12 @@ kaaPixmapAllocArea (PixmapPtr pPixmap)
static void
kaaMoveInPixmap (PixmapPtr pPixmap)
{
+ ScreenPtr pScreen = pPixmap->drawable.pScreen;
+ KaaScreenPriv (pScreen);
int dst_pitch, src_pitch, bytes;
unsigned char *dst, *src;
int i;
- KdCheckSync (pPixmap->drawable.pScreen);
-
DBG_MIGRATE (("-> 0x%08x (0x%x) (%dx%d)\n",
pPixmap->drawable.id,
KaaGetPixmapPriv(pPixmap)->area ?
@@ -150,11 +150,19 @@ kaaMoveInPixmap (PixmapPtr pPixmap)
if (!kaaPixmapAllocArea (pPixmap))
return;
+ if (pKaaScr->info->UploadToScreen)
+ {
+ if (pKaaScr->info->UploadToScreen(pPixmap, src, src_pitch))
+ return;
+ }
+
dst = pPixmap->devPrivate.ptr;
dst_pitch = pPixmap->devKind;
bytes = src_pitch < dst_pitch ? src_pitch : dst_pitch;
+ KdCheckSync (pPixmap->drawable.pScreen);
+
i = pPixmap->drawable.height;
while (i--) {
memcpy (dst, src, bytes);