VirtualBox

Ignore:
Timestamp:
Apr 12, 2010 5:04:54 PM (15 years ago)
Author:
vboxsync
Message:

IDisplay::DrawToScreen for multimonitor (xTracker 4655)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/DisplayImpl.cpp

    r28215 r28220  
    23802380
    23812381#ifdef VBOX_WITH_OLD_VBVA_LOCK
    2382 int Display::DrawToScreenEMT(Display *pDisplay, BYTE *address, ULONG x, ULONG y, ULONG width, ULONG height)
     2382int Display::drawToScreenEMT(Display *pDisplay, ULONG aScreenId, BYTE *address, ULONG x, ULONG y, ULONG width, ULONG height)
    23832383{
    23842384    int rc;
    23852385    pDisplay->vbvaLock();
    2386     rc = pDisplay->mpDrv->pUpPort->pfnDisplayBlt(pDisplay->mpDrv->pUpPort, address, x, y, width, height);
     2386    if (aScreenId == VBOX_VIDEO_PRIMARY_SCREEN)
     2387    {
     2388        rc = pDisplay->mpDrv->pUpPort->pfnDisplayBlt(pDisplay->mpDrv->pUpPort, address, x, y, width, height);
     2389    }
     2390    else if (aScreenId < pDisplay->mcMonitors)
     2391    {
     2392        DISPLAYFBINFO *pFBInfo = &pDisplay->maFramebuffers[aScreenId];
     2393
     2394        const uint8_t *pu8Src       = address;
     2395        int32_t xSrc                = 0;
     2396        int32_t ySrc                = 0;
     2397        uint32_t u32SrcWidth        = width;
     2398        uint32_t u32SrcHeight       = height;
     2399        uint32_t u32SrcLineSize     = width * 4;
     2400        uint32_t u32SrcBitsPerPixel = 32;
     2401
     2402        uint8_t *pu8Dst             = pFBInfo->pu8FramebufferVRAM;
     2403        int32_t xDst                = x;
     2404        int32_t yDst                = y;
     2405        uint32_t u32DstWidth        = pFBInfo->w;
     2406        uint32_t u32DstHeight       = pFBInfo->h;
     2407        uint32_t u32DstLineSize     = pFBInfo->u32LineSize;
     2408        uint32_t u32DstBitsPerPixel = pFBInfo->u16BitsPerPixel;
     2409
     2410        rc = pDisplay->mpDrv->pUpPort->pfnCopyRect(pDisplay->mpDrv->pUpPort,
     2411                                                   width, height,
     2412                                                   pu8Src,
     2413                                                   xSrc, ySrc,
     2414                                                   u32SrcWidth, u32SrcHeight,
     2415                                                   u32SrcLineSize, u32SrcBitsPerPixel,
     2416                                                   pu8Dst,
     2417                                                   xDst, yDst,
     2418                                                   u32DstWidth, u32DstHeight,
     2419                                                   u32DstLineSize, u32DstBitsPerPixel);
     2420    }
     2421    else
     2422    {
     2423        rc = VERR_INVALID_PARAMETER;
     2424    }
    23872425    pDisplay->vbvaUnlock();
    23882426    return rc;
     
    24222460     */
    24232461#ifdef VBOX_WITH_OLD_VBVA_LOCK
    2424     int rcVBox = VMR3ReqCallWait(pVM, VMCPUID_ANY, (PFNRT)Display::DrawToScreenEMT, 6,
    2425                                  this, address, x, y, width, height);
     2462    int rcVBox = VMR3ReqCallWait(pVM, VMCPUID_ANY, (PFNRT)Display::drawToScreenEMT, 7,
     2463                                 this, aScreenId, address, x, y, width, height);
    24262464#else
    24272465    int rcVBox = VMR3ReqCallWait(pVM, VMCPUID_ANY, (PFNRT)mpDrv->pUpPort->pfnDisplayBlt, 6,
     
    32863324                if (SUCCEEDED(hrc) && address != NULL)
    32873325                {
    3288                     pDrv->pUpPort->pfnUpdateDisplayRectEx (pDrv->pUpPort,
    3289                                                            pCmd->x - pFBInfo->xOrigin, pCmd->y - pFBInfo->yOrigin, pCmd->w, pCmd->h,
    3290                                                            pFBInfo->pu8FramebufferVRAM, pFBInfo->w, pFBInfo->h,
    3291                                                            pFBInfo->u32LineSize, pFBInfo->u16BitsPerPixel,
    3292                                                            address, pFBInfo->w, pFBInfo->h,
    3293                                                            pFBInfo->w * 4, 32);
     3326                    uint32_t width              = pCmd->w;
     3327                    uint32_t height             = pCmd->h;
     3328
     3329                    const uint8_t *pu8Src       = pFBInfo->pu8FramebufferVRAM;
     3330                    int32_t xSrc                = pCmd->x - pFBInfo->xOrigin;
     3331                    int32_t ySrc                = pCmd->y - pFBInfo->yOrigin;
     3332                    uint32_t u32SrcWidth        = pFBInfo->w;
     3333                    uint32_t u32SrcHeight       = pFBInfo->h;
     3334                    uint32_t u32SrcLineSize     = pFBInfo->u32LineSize;
     3335                    uint32_t u32SrcBitsPerPixel = pFBInfo->u16BitsPerPixel;
     3336
     3337                    uint8_t *pu8Dst             = address;
     3338                    int32_t xDst                = xSrc;
     3339                    int32_t yDst                = ySrc;
     3340                    uint32_t u32DstWidth        = u32SrcWidth;
     3341                    uint32_t u32DstHeight       = u32SrcHeight;
     3342                    uint32_t u32DstLineSize     = u32DstWidth * 4;
     3343                    uint32_t u32DstBitsPerPixel = 32;
     3344
     3345                    pDrv->pUpPort->pfnCopyRect(pDrv->pUpPort,
     3346                                               width, height,
     3347                                               pu8Src,
     3348                                               xSrc, ySrc,
     3349                                               u32SrcWidth, u32SrcHeight,
     3350                                               u32SrcLineSize, u32SrcBitsPerPixel,
     3351                                               pu8Dst,
     3352                                               xDst, yDst,
     3353                                               u32DstWidth, u32DstHeight,
     3354                                               u32DstLineSize, u32DstBitsPerPixel);
    32943355                }
    32953356            }
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