VirtualBox

Ignore:
Timestamp:
Apr 22, 2010 3:45:36 PM (15 years ago)
Author:
vboxsync
Message:

Main/Display: resize a new framebuffer (xTracker 4655)

File:
1 edited

Legend:

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

    r28468 r28602  
    28942894 *  Helper to update the display information from the framebuffer.
    28952895 *
    2896  *  @param aCheckParams true to compare the parameters of the current framebuffer
    2897  *                      and the new one and issue handleDisplayResize()
    2898  *                      if they differ.
    28992896 *  @thread EMT
    29002897 */
    2901 void Display::updateDisplayData (bool aCheckParams /* = false */)
    2902 {
     2898void Display::updateDisplayData(void)
     2899{
     2900    LogFlowFunc (("\n"));
     2901
    29032902    /* the driver might not have been constructed yet */
    29042903    if (!mpDrv)
     
    29412940        AssertComRC (rc);
    29422941
    2943         /*
    2944          *  Check current parameters with new ones and issue handleDisplayResize()
    2945          *  to let the new frame buffer adjust itself properly. Note that it will
    2946          *  result into a recursive updateDisplayData() call but with
    2947          *  aCheckOld = false.
    2948          */
    2949         if (aCheckParams &&
    2950             (mLastAddress != address ||
    2951              mLastBytesPerLine != bytesPerLine ||
    2952              mLastBitsPerPixel != bitsPerPixel ||
    2953              mLastWidth != (int) width ||
    2954              mLastHeight != (int) height))
    2955         {
    2956             handleDisplayResize (VBOX_VIDEO_PRIMARY_SCREEN, mLastBitsPerPixel,
    2957                                  mLastAddress,
    2958                                  mLastBytesPerLine,
    2959                                  mLastWidth,
    2960                                  mLastHeight);
    2961             return;
    2962         }
    2963 
    29642942        mpDrv->IConnector.pu8Data = (uint8_t *) address;
    29652943        mpDrv->IConnector.cbScanline = bytesPerLine;
     
    29772955        mpDrv->IConnector.cy = 0;
    29782956    }
     2957    LogFlowFunc (("leave\n"));
    29792958}
    29802959
     
    30052984    that->mParent->consoleVRDPServer()->SendResize ();
    30062985
    3007     that->updateDisplayData (true /* aCheckParams */);
    3008 
     2986    /* The driver might not have been constructed yet */
     2987    if (that->mpDrv)
     2988    {
     2989        /* Setup the new framebuffer, the resize will lead to an updateDisplayData call. */
     2990        DISPLAYFBINFO *pFBInfo = &that->maFramebuffers[uScreenId];
     2991
     2992        if (pFBInfo->fVBVAEnabled && pFBInfo->pu8FramebufferVRAM)
     2993        {
     2994            /* This display in VBVA mode. Resize it to the last guest resolution,
     2995             * if it has been reported.
     2996             */
     2997            that->handleDisplayResize(uScreenId, pFBInfo->u16BitsPerPixel,
     2998                                      pFBInfo->pu8FramebufferVRAM,
     2999                                      pFBInfo->u32LineSize,
     3000                                      pFBInfo->w,
     3001                                      pFBInfo->h);
     3002        }
     3003        else if (uScreenId == VBOX_VIDEO_PRIMARY_SCREEN)
     3004        {
     3005            /* VGA device mode, only for the primary screen. */
     3006            that->handleDisplayResize(VBOX_VIDEO_PRIMARY_SCREEN, that->mLastBitsPerPixel,
     3007                                      that->mLastAddress,
     3008                                      that->mLastBytesPerLine,
     3009                                      that->mLastWidth,
     3010                                      that->mLastHeight);
     3011        }
     3012    }
     3013
     3014    LogFlowFunc (("leave\n"));
    30093015    return VINF_SUCCESS;
    30103016}
     
    35573563    Display *pThis = pDrv->pDisplay;
    35583564
    3559     pThis->maFramebuffers[uScreenId].fVBVAEnabled = false;
    3560 
    3561     vbvaSetMemoryFlagsHGSMI(uScreenId, 0, false, &pThis->maFramebuffers[uScreenId]);
    3562 
    3563     pThis->maFramebuffers[uScreenId].pVBVAHostFlags = NULL;
     3565    DISPLAYFBINFO *pFBInfo = &pThis->maFramebuffers[uScreenId];
     3566
     3567    pFBInfo->fVBVAEnabled = false;
     3568
     3569    vbvaSetMemoryFlagsHGSMI(uScreenId, 0, false, pFBInfo);
     3570
     3571    pFBInfo->pVBVAHostFlags = NULL;
     3572
     3573    pFBInfo->u32Offset = 0; /* Not used in HGSMI. */
     3574    pFBInfo->u32MaxFramebufferSize = 0; /* Not used in HGSMI. */
     3575    pFBInfo->u32InformationSize = 0; /* Not used in HGSMI. */
     3576
     3577    pFBInfo->xOrigin = 0;
     3578    pFBInfo->yOrigin = 0;
     3579
     3580    pFBInfo->w = 0;
     3581    pFBInfo->h = 0;
     3582
     3583    pFBInfo->u16BitsPerPixel = 0;
     3584    pFBInfo->pu8FramebufferVRAM = NULL;
     3585    pFBInfo->u32LineSize = 0;
    35643586}
    35653587
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