diff options
author | vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f> | 2017-11-29 17:20:04 +0000 |
---|---|---|
committer | vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f> | 2017-11-29 17:20:04 +0000 |
commit | 6d66ae5c4d5b677ed2f6ca42642ccc2241766dff (patch) | |
tree | aa180f0fcea4e5cd26f953819b370a059fb4eb00 /src/VBox/Devices/Graphics/DevVGA_VDMA.cpp | |
parent | 5fbb34d7f12e503862b4c2884f6651d8f86f4102 (diff) | |
download | VirtualBox-svn-6d66ae5c4d5b677ed2f6ca42642ccc2241766dff.tar.gz |
Devices/Graphics: Code cleanup in VDMA blitter
git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@69870 cfe28804-0f27-0410-a406-dd0f0b0b656f
Diffstat (limited to 'src/VBox/Devices/Graphics/DevVGA_VDMA.cpp')
-rw-r--r-- | src/VBox/Devices/Graphics/DevVGA_VDMA.cpp | 33 |
1 files changed, 10 insertions, 23 deletions
diff --git a/src/VBox/Devices/Graphics/DevVGA_VDMA.cpp b/src/VBox/Devices/Graphics/DevVGA_VDMA.cpp index 94cd4180339..c0cdc7d3f7b 100644 --- a/src/VBox/Devices/Graphics/DevVGA_VDMA.cpp +++ b/src/VBox/Devices/Graphics/DevVGA_VDMA.cpp @@ -2440,39 +2440,26 @@ static int vboxVDMACmdExecBlt(PVBOXVDMAHOST pVdma, const PVBOXVDMACMD_DMA_PRESEN if (pBlt->cDstSubRects) { - VBOXVDMA_RECTL dstRectl, srcRectl; - const VBOXVDMA_RECTL *pDstRectl, *pSrcRectl; for (uint32_t i = 0; i < pBlt->cDstSubRects; ++i) { - pDstRectl = &pBlt->aDstSubRects[i]; - if (pBlt->dstRectl.left || pBlt->dstRectl.top) - { - dstRectl.left = pDstRectl->left + pBlt->dstRectl.left; - dstRectl.top = pDstRectl->top + pBlt->dstRectl.top; - dstRectl.width = pDstRectl->width; - dstRectl.height = pDstRectl->height; - pDstRectl = &dstRectl; - } + VBOXVDMA_RECTL dstSubRectl = pBlt->aDstSubRects[i]; + VBOXVDMA_RECTL srcSubRectl = dstSubRectl; - pSrcRectl = &pBlt->aDstSubRects[i]; - if (pBlt->srcRectl.left || pBlt->srcRectl.top) - { - srcRectl.left = pSrcRectl->left + pBlt->srcRectl.left; - srcRectl.top = pSrcRectl->top + pBlt->srcRectl.top; - srcRectl.width = pSrcRectl->width; - srcRectl.height = pSrcRectl->height; - pSrcRectl = &srcRectl; - } + dstSubRectl.left += pBlt->dstRectl.left; + dstSubRectl.top += pBlt->dstRectl.top; + + srcSubRectl.left += pBlt->srcRectl.left; + srcSubRectl.top += pBlt->srcRectl.top; int rc = vboxVDMACmdExecBltPerform(pVdma, pvRam + pBlt->offDst, pvRam + pBlt->offSrc, &pBlt->dstDesc, &pBlt->srcDesc, - pDstRectl, - pSrcRectl); + &dstSubRectl, + &srcSubRectl); AssertRC(rc); if (!RT_SUCCESS(rc)) return rc; - vboxVDMARectlUnite(&updateRectl, pDstRectl); + vboxVDMARectlUnite(&updateRectl, &dstSubRectl); } } else |