VirtualBox

Changeset 27751 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Mar 26, 2010 3:28:43 PM (15 years ago)
Author:
vboxsync
Message:

Main/Display: VBVA should call Framebuffer::RequestResize only if framebuffer parameters change (xTracker 4655).

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

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

    r27724 r27751  
    630630        maFramebuffers[ul].w = 0;
    631631        maFramebuffers[ul].h = 0;
     632
     633        maFramebuffers[ul].u16BitsPerPixel = 0;
     634        maFramebuffers[ul].pu8FramebufferVRAM = NULL;
     635        maFramebuffers[ul].u32LineSize = 0;
    632636
    633637        maFramebuffers[ul].pHostEvents = NULL;
     
    33743378    DISPLAYFBINFO *pFBInfo = &pThis->maFramebuffers[pScreen->u32ViewIndex];
    33753379
     3380    /* Check if this is a real resize or a notification about the screen origin.
     3381     * The guest uses this VBVAResize call for both.
     3382     */
     3383    bool fResize =    pFBInfo->u16BitsPerPixel != pScreen->u16BitsPerPixel
     3384                   || pFBInfo->pu8FramebufferVRAM != (uint8_t *)pvVRAM + pScreen->u32StartOffset
     3385                   || pFBInfo->u32LineSize != pScreen->u32LineSize
     3386                   || pFBInfo->w != pScreen->u32Width
     3387                   || pFBInfo->h != pScreen->u32Height;
     3388
     3389    bool fNewOrigin =    pFBInfo->xOrigin != pScreen->i32OriginX
     3390                      || pFBInfo->yOrigin != pScreen->i32OriginY;
     3391
    33763392    pFBInfo->u32Offset = pView->u32ViewOffset; /* Not used in HGSMI. */
    33773393    pFBInfo->u32MaxFramebufferSize = pView->u32MaxScreenSize; /* Not used in HGSMI. */
     
    33833399    pFBInfo->w = pScreen->u32Width;
    33843400    pFBInfo->h = pScreen->u32Height;
     3401
     3402    pFBInfo->u16BitsPerPixel = pScreen->u16BitsPerPixel;
     3403    pFBInfo->pu8FramebufferVRAM = (uint8_t *)pvVRAM + pScreen->u32StartOffset;
     3404    pFBInfo->u32LineSize = pScreen->u32LineSize;
     3405
     3406    if (fNewOrigin)
     3407    {
     3408        /* @todo May be framebuffer/display should be notified in this case. */
     3409    }
     3410
     3411    if (!fResize)
     3412    {
     3413        /* No paramaters of the framebuffer have actually changed. */
     3414        return VINF_SUCCESS;
     3415    }
    33853416
    33863417    return pThis->handleDisplayResize(pScreen->u32ViewIndex, pScreen->u16BitsPerPixel,
  • trunk/src/VBox/Main/include/DisplayImpl.h

    r27607 r27751  
    5353    ULONG h;
    5454
     55    uint16_t u16BitsPerPixel;
     56    uint8_t *pu8FramebufferVRAM;
     57    uint32_t u32LineSize;
     58
    5559    VBOXVIDEOINFOHOSTEVENTS *pHostEvents;
    5660
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