Avoid attempting acceleration on non-screen formats (for now)
Offscreen allocator API changes.
This commit is contained in:
		
							parent
							
								
									cb46169759
								
							
						
					
					
						commit
						28bcd2efd1
					
				| 
						 | 
				
			
			@ -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;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue