VirtualBox

Changeset 21611 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Jul 15, 2009 2:42:25 PM (15 years ago)
Author:
vboxsync
Message:

video hw accel: DdLock optimization

Location:
trunk/src/VBox/Additions/WINNT/Graphics/Display
Files:
2 edited

Legend:

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

    r21609 r21611  
    10551055        {
    10561056            VBOXVHWACMD_SURF_LOCK * pBody = VBOXVHWACMD_BODY(pCmd, VBOXVHWACMD_SURF_LOCK);
    1057             RECT tmpRect, *pRect;
     1057            RECTL tmpRect, *pRect;
    10581058            memset(pBody, 0, sizeof(VBOXVHWACMD_SURF_LOCK));
    10591059
     
    10651065                vboxVHWAFromRECTL(&pBody->u.in.rect, &lpLock->rArea);
    10661066                pBody->u.in.rectValid = 1;
     1067
     1068                pRect = &lpLock->rArea;
     1069
    10671070            }
    10681071            else
    10691072            {
    10701073                pBody->u.in.rectValid = 0;
    1071             }
    1072 
    1073             pBody->u.in.hSurf = pDesc->hHostHandle;
    1074 
    1075             if(lpLock->bHasRect)
    1076             {
    1077                 pRect = &lpLock->rArea;
    1078             }
    1079             else
    1080             {
     1074
    10811075                tmpRect.left=0;
    10821076                tmpRect.top=0;
     
    10851079                pRect = &tmpRect;
    10861080            }
     1081
     1082            pBody->u.in.hSurf = pDesc->hHostHandle;
    10871083
    10881084            if(VBOXDD_CHECKFLAG(lpLock->dwFlags, DDLOCK_DISCARDCONTENTS))
     
    11081104                vboxVHWACommandSubmit(pDev, pCmd);
    11091105                vboxVHWACommandFree(pDev, pCmd);
     1106                vboxVHWARegionClear(&pDesc->DirtyRegion);
    11101107            }
    11111108
     
    14851482            ASMAtomicIncU32(&pDestDesc->cPendingBltsDst);
    14861483
    1487 //            if(VBOXDD_CHECKFLAG(lpBlt->dwFlags, DDBLT_ASYNC))
    1488 //            {
    1489                 vboxVHWACommandSubmitAsynch(pDev, pCmd, vboxVHWASurfBltCompletion, NULL);
    1490 //            }
    1491 //            else
    1492 //            {
    1493 //                vboxVHWACommandSubmit(pDev, pCmd);
    1494 //            }
     1484            vboxVHWARegionAdd(&pDestDesc->DirtyRegion, &lpBlt->rDest);
     1485            vboxVHWACommandSubmitAsynch(pDev, pCmd, vboxVHWASurfBltCompletion, NULL);
     1486
    14951487            lpBlt->ddRVal = DD_OK;
    14961488        }
  • trunk/src/VBox/Additions/WINNT/Graphics/Display/driver.h

    r21596 r21611  
    9797typedef struct _VBOXVHWAREGION
    9898{
    99     RECT Rect;
     99    RECTL Rect;
    100100    bool bValid;
    101101}VBOXVHWAREGION, *PVBOXVHWAREGION;
     
    295295typedef DECLCALLBACK(void) FNVBOXVHWACMDCOMPLETION(PPDEV ppdev, VBOXVHWACMD * pCmd, void * pContext);
    296296typedef FNVBOXVHWACMDCOMPLETION *PFNVBOXVHWACMDCOMPLETION;
     297
     298void vboxVHWARectUnited(RECTL * pDst, RECTL * pRect1, RECTL * pRect2);
     299bool vboxVHWARectIsEmpty(RECTL * pRect);
     300bool vboxVHWARectIntersect(RECTL * pRect1, RECTL * pRect2);
     301bool vboxVHWARectInclude(RECTL * pRect1, RECTL * pRect2);
     302bool vboxVHWARegionIntersects(PVBOXVHWAREGION pReg, RECTL * pRect);
     303bool vboxVHWARegionIncludes(PVBOXVHWAREGION pReg, RECTL * pRect);
     304bool vboxVHWARegionIncluded(PVBOXVHWAREGION pReg, RECTL * pRect);
     305void vboxVHWARegionSet(PVBOXVHWAREGION pReg, RECTL * pRect);
     306void vboxVHWARegionAdd(PVBOXVHWAREGION pReg, RECTL * pRect);
     307void vboxVHWARegionInit(PVBOXVHWAREGION pReg);
     308void vboxVHWARegionClear(PVBOXVHWAREGION pReg);
    297309
    298310VBOXVHWACMD* vboxVHWACommandCreate (PPDEV ppdev, VBOXVHWACMD_TYPE enmCmd, VBOXVHWACMD_LENGTH cbCmd);
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