VirtualBox

Ignore:
Timestamp:
Oct 4, 2007 4:09:56 PM (17 years ago)
Author:
vboxsync
Message:

DdMapMemory must map the offscreen heap as well. Report DdLock updates only for the primary surface.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Display/dd.c

    r5144 r5159  
    649649
    650650        ShareMemory.ViewOffset = 0;
    651         ShareMemory.ViewSize   = pDev->cyScreen * pDev->lDeltaScreen;
     651
     652        // We map down to the end of the frame buffer, including the offscreen heap.
     653        ShareMemory.ViewSize   = pDev->layout.offVBVABuffer;
    652654
    653655        DISPDBG((0, "ViewSize = %x\n", ShareMemory.ViewSize));
     
    661663                       &ReturnedDataLength))
    662664        {
    663             DISPDBG((0, "Failed IOCTL_VIDEO_SHARE_MEMORY"));
     665            DISPDBG((0, "Failed IOCTL_VIDEO_SHARE_MEMORY\n"));
    664666
    665667            lpMapMemory->ddRVal = DDERR_GENERIC;
     
    717719{
    718720    PPDEV pDev = (PPDEV)lpLock->lpDD->dhpdev;
    719 
    720     DISPDBG((0, "%s: %p bHasRect = %d\n", __FUNCTION__, pDev, lpLock->bHasRect));
    721721   
    722     pDev->ddLock.bLocked = TRUE;
    723    
    724     if (lpLock->bHasRect)
    725     {
    726         DISPDBG((0, "%d,%d %dx%d\n", lpLock->rArea.left, lpLock->rArea.top, lpLock->rArea.right - lpLock->rArea.left, lpLock->rArea.bottom - lpLock->rArea.top));
    727         pDev->ddLock.rArea = lpLock->rArea;
    728     }
    729     else
    730     {
    731         pDev->ddLock.rArea.left   = 0;
    732         pDev->ddLock.rArea.top    = 0;
    733         pDev->ddLock.rArea.right  = pDev->cxScreen;
    734         pDev->ddLock.rArea.bottom = pDev->cyScreen;
     722    PDD_SURFACE_LOCAL lpSurfaceLocal = lpLock->lpDDSurface;
     723
     724    DISPDBG((0, "%s: %p bHasRect = %d fpProcess = %p\n", __FUNCTION__, pDev, lpLock->bHasRect, lpLock->fpProcess));
     725
     726    if (lpSurfaceLocal->ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)
     727    {
     728        /* The updated rectangle must be reported only for the primary surface. */
     729        pDev->ddLock.bLocked = TRUE;
     730
     731        if (lpLock->bHasRect)
     732        {
     733            DISPDBG((0, "%d,%d %dx%d\n", lpLock->rArea.left, lpLock->rArea.top, lpLock->rArea.right - lpLock->rArea.left, lpLock->rArea.bottom - lpLock->rArea.top));
     734            pDev->ddLock.rArea = lpLock->rArea;
     735        }
     736        else
     737        {
     738            pDev->ddLock.rArea.left   = 0;
     739            pDev->ddLock.rArea.top    = 0;
     740            pDev->ddLock.rArea.right  = pDev->cxScreen;
     741            pDev->ddLock.rArea.bottom = pDev->cyScreen;
     742        }
     743    }
     744    else
     745    {
     746        DISPDBG((0, "%s: secondary surface.\n", __FUNCTION__));
    735747    }
    736748
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette