Commit 28bcd2ef authored by Keith Packard's avatar Keith Packard

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

Offscreen allocator API changes.
parent cb461697
......@@ -105,6 +105,12 @@ mach64Setup (PixmapPtr pDst, PixmapPtr pSrc, CARD32 combo, int wait)
if (!reg)
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 */
DST_PITCH = pDst->devKind / pDst->drawable.bitsPerPixel;
if (triple)
......
......@@ -557,13 +557,16 @@ mach64DisplayVideo(KdScreenInfo *screen,
}
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
mach64VideoMoveOut (KdOffscreenArea *area)
{
if (pPortPriv->off_screen == area)
pPortPriv->off_screen = 0;
}
static int
......@@ -710,8 +713,7 @@ mach64PutImage(KdScreenInfo *screen,
if (!pPortPriv->off_screen)
{
pPortPriv->off_screen = KdOffscreenAlloc (screen->pScreen, size * 2, 64,
TRUE, mach64VideoMoveIn,
mach64VideoMoveOut,
TRUE, mach64VideoSave,
pPortPriv);
if (!pPortPriv->off_screen)
return BadAlloc;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment