VirtualBox

Changeset 69870 in vbox


Ignore:
Timestamp:
Nov 29, 2017 5:20:04 PM (7 years ago)
Author:
vboxsync
Message:

Devices/Graphics: Code cleanup in VDMA blitter

File:
1 edited

Legend:

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

    r69848 r69870  
    24412441    if (pBlt->cDstSubRects)
    24422442    {
    2443         VBOXVDMA_RECTL dstRectl, srcRectl;
    2444         const VBOXVDMA_RECTL *pDstRectl, *pSrcRectl;
    24452443        for (uint32_t i = 0; i < pBlt->cDstSubRects; ++i)
    24462444        {
    2447             pDstRectl = &pBlt->aDstSubRects[i];
    2448             if (pBlt->dstRectl.left || pBlt->dstRectl.top)
    2449             {
    2450                 dstRectl.left = pDstRectl->left + pBlt->dstRectl.left;
    2451                 dstRectl.top = pDstRectl->top + pBlt->dstRectl.top;
    2452                 dstRectl.width = pDstRectl->width;
    2453                 dstRectl.height = pDstRectl->height;
    2454                 pDstRectl = &dstRectl;
    2455             }
    2456 
    2457             pSrcRectl = &pBlt->aDstSubRects[i];
    2458             if (pBlt->srcRectl.left || pBlt->srcRectl.top)
    2459             {
    2460                 srcRectl.left = pSrcRectl->left + pBlt->srcRectl.left;
    2461                 srcRectl.top = pSrcRectl->top + pBlt->srcRectl.top;
    2462                 srcRectl.width = pSrcRectl->width;
    2463                 srcRectl.height = pSrcRectl->height;
    2464                 pSrcRectl = &srcRectl;
    2465             }
     2445            VBOXVDMA_RECTL dstSubRectl = pBlt->aDstSubRects[i];
     2446            VBOXVDMA_RECTL srcSubRectl = dstSubRectl;
     2447
     2448            dstSubRectl.left += pBlt->dstRectl.left;
     2449            dstSubRectl.top  += pBlt->dstRectl.top;
     2450
     2451            srcSubRectl.left += pBlt->srcRectl.left;
     2452            srcSubRectl.top  += pBlt->srcRectl.top;
    24662453
    24672454            int rc = vboxVDMACmdExecBltPerform(pVdma, pvRam + pBlt->offDst, pvRam + pBlt->offSrc,
    24682455                    &pBlt->dstDesc, &pBlt->srcDesc,
    2469                     pDstRectl,
    2470                     pSrcRectl);
     2456                    &dstSubRectl,
     2457                    &srcSubRectl);
    24712458            AssertRC(rc);
    24722459            if (!RT_SUCCESS(rc))
    24732460                return rc;
    24742461
    2475             vboxVDMARectlUnite(&updateRectl, pDstRectl);
     2462            vboxVDMARectlUnite(&updateRectl, &dstSubRectl);
    24762463        }
    24772464    }
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