Avoid attempting acceleration on non-screen formats (for now)

Offscreen allocator API changes.
This commit is contained in:
Keith Packard 2003-10-14 21:33:04 +00:00
parent cb46169759
commit 28bcd2efd1
2 changed files with 15 additions and 7 deletions

View File

@ -105,6 +105,12 @@ mach64Setup (PixmapPtr pDst, PixmapPtr pSrc, CARD32 combo, int wait)
if (!reg) if (!reg)
return FALSE; return FALSE;
/*
* No acceleration for other formats (yet)
*/
if (pDst->drawable.bitsPerPixel != pScreenPriv->screen->fb[0].bitsPerPixel)
return FALSE;
/* pixels / 8 = ((bytes * 8) / bpp) / 8 = bytes / bpp */ /* pixels / 8 = ((bytes * 8) / bpp) / 8 = bytes / bpp */
DST_PITCH = pDst->devKind / pDst->drawable.bitsPerPixel; DST_PITCH = pDst->devKind / pDst->drawable.bitsPerPixel;
if (triple) if (triple)

View File

@ -557,13 +557,16 @@ mach64DisplayVideo(KdScreenInfo *screen,
} }
static void static void
mach64VideoMoveIn (KdOffscreenArea *area) mach64VideoSave (KdOffscreenArea *area)
{ {
} ScreenPtr pScreen = area->screen;
KdScreenPriv(pScreen);
KdScreenInfo *screen = pScreenPriv->screen;
Mach64ScreenInfo *mach64s = (Mach64ScreenInfo *) screen->driver;
Mach64PortPrivPtr pPortPriv = mach64s->pAdaptor->pPortPrivates[0].ptr;
static void if (pPortPriv->off_screen == area)
mach64VideoMoveOut (KdOffscreenArea *area) pPortPriv->off_screen = 0;
{
} }
static int static int
@ -710,8 +713,7 @@ mach64PutImage(KdScreenInfo *screen,
if (!pPortPriv->off_screen) if (!pPortPriv->off_screen)
{ {
pPortPriv->off_screen = KdOffscreenAlloc (screen->pScreen, size * 2, 64, pPortPriv->off_screen = KdOffscreenAlloc (screen->pScreen, size * 2, 64,
TRUE, mach64VideoMoveIn, TRUE, mach64VideoSave,
mach64VideoMoveOut,
pPortPriv); pPortPriv);
if (!pPortPriv->off_screen) if (!pPortPriv->off_screen)
return BadAlloc; return BadAlloc;