VirtualBox

Changeset 69884 in vbox


Ignore:
Timestamp:
Nov 30, 2017 4:38:18 PM (7 years ago)
Author:
vboxsync
Message:

Devices/Graphics: Use offsets instead of pointers as arguments in VDMA blitter

File:
1 edited

Legend:

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

    r69870 r69884  
    23332333}
    23342334
    2335 static int vboxVDMACmdExecBltPerform(PVBOXVDMAHOST pVdma, uint8_t *pvDstSurf, const uint8_t *pvSrcSurf,
     2335static int vboxVDMACmdExecBltPerform(PVBOXVDMAHOST pVdma, const VBOXVIDEOOFFSET offDst, const VBOXVIDEOOFFSET offSrc,
    23362336                                     const PVBOXVDMA_SURF_DESC pDstDesc, const PVBOXVDMA_SURF_DESC pSrcDesc,
    23372337                                     const VBOXVDMA_RECTL * pDstRectl, const VBOXVDMA_RECTL * pSrcRectl)
    23382338{
    2339     RT_NOREF(pVdma);
    23402339    /* we do not support color conversion */
    23412340    Assert(pDstDesc->format == pSrcDesc->format);
     
    23432342    Assert(pDstRectl->height == pSrcRectl->height);
    23442343    Assert(pDstRectl->width == pSrcRectl->width);
     2344
    23452345    if (pDstDesc->format != pSrcDesc->format)
    23462346        return VERR_INVALID_FUNCTION;
     2347
     2348    uint8_t *pvRam = pVdma->pVGAState->vram_ptrR3;
     2349    uint8_t *pvDstSurf = pvRam + offDst;
     2350    uint8_t *pvSrcSurf = pvRam + offSrc;
     2351
    23472352    if (pDstDesc->width == pDstRectl->width
    23482353            && pSrcDesc->width == pSrcRectl->width
    2349             && pSrcDesc->width == pDstDesc->width)
     2354            && pSrcDesc->width == pDstDesc->width
     2355            && pSrcDesc->pitch == pDstDesc->pitch)
    23502356    {
    23512357        Assert(!pDstRectl->left);
     
    24362442    Assert(pBlt->cDstSubRects);
    24372443
    2438     uint8_t * pvRam = pVdma->pVGAState->vram_ptrR3;
    24392444    VBOXVDMA_RECTL updateRectl = {0, 0, 0, 0};
    24402445
     
    24522457            srcSubRectl.top  += pBlt->srcRectl.top;
    24532458
    2454             int rc = vboxVDMACmdExecBltPerform(pVdma, pvRam + pBlt->offDst, pvRam + pBlt->offSrc,
     2459            int rc = vboxVDMACmdExecBltPerform(pVdma, pBlt->offDst, pBlt->offSrc,
    24552460                    &pBlt->dstDesc, &pBlt->srcDesc,
    24562461                    &dstSubRectl,
     
    24652470    else
    24662471    {
    2467         int rc = vboxVDMACmdExecBltPerform(pVdma, pvRam + pBlt->offDst, pvRam + pBlt->offSrc,
     2472        int rc = vboxVDMACmdExecBltPerform(pVdma, pBlt->offDst, pBlt->offSrc,
    24682473                &pBlt->dstDesc, &pBlt->srcDesc,
    24692474                &pBlt->dstRectl,
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