VirtualBox

Changeset 27426 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Mar 16, 2010 8:17:12 PM (15 years ago)
Author:
vboxsync
Message:

wddm: graphics dev partial screen update fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/DevVGA_VDMA.cpp

    r27389 r27426  
    140140    else
    141141    {
    142         uint32_t offDstStart = pDstDesc->pitch * pDstRectl->top + pDstRectl->left;
    143         uint32_t cbDstLine = pDstDesc->bpp * pDstRectl->width;
    144         cbDstLine = !(cbDstLine & 7) ? cbDstLine >> 3 : (cbDstLine >> 3) + 1;
     142        uint32_t offDstLineStart = pDstRectl->left * pDstDesc->bpp >> 3;
     143        uint32_t offDstLineEnd = ((pDstRectl->left * pDstDesc->bpp + 7) >> 3) + ((pDstDesc->bpp * pDstRectl->width + 7) >> 3);
     144        uint32_t cbDstLine = offDstLineEnd - offDstLineStart;
     145        uint32_t offDstStart = pDstDesc->pitch * pDstRectl->top + offDstLineStart;
    145146        Assert(cbDstLine <= pDstDesc->pitch);
    146147        uint32_t cbDstSkip = pDstDesc->pitch;
    147148        uint8_t * pvDstStart = pvDstSurf + offDstStart;
    148149
    149         uint32_t offSrcStart = pSrcDesc->pitch * pSrcRectl->top + pSrcRectl->left;
    150         uint32_t cbSrcLine = pSrcDesc->bpp * pSrcRectl->width;
    151         cbSrcLine = !(cbSrcLine & 7) ? cbSrcLine >> 3 : (cbSrcLine >> 3) + 1;
     150        uint32_t offSrcLineStart = pSrcRectl->left * pSrcDesc->bpp >> 3;
     151        uint32_t offSrcLineEnd = ((pSrcRectl->left * pSrcDesc->bpp + 7) >> 3) + ((pSrcDesc->bpp * pSrcRectl->width + 7) >> 3);
     152        uint32_t cbSrcLine = offSrcLineEnd - offSrcLineStart;
     153        uint32_t offSrcStart = pSrcDesc->pitch * pSrcRectl->top + offSrcLineStart;
    152154        Assert(cbSrcLine <= pSrcDesc->pitch);
    153155        uint32_t cbSrcSkip = pSrcDesc->pitch;
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