VirtualBox

Changeset 2219 in vbox for trunk


Ignore:
Timestamp:
Apr 19, 2007 12:19:29 PM (18 years ago)
Author:
vboxsync
Message:

Repaint display when framebuffer completed an asynchronous resize.

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

Legend:

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

    r2212 r2219  
    273273
    274274    /* The method also unlocks the framebuffer. */
    275     handleResizeCompletedEMT(false /* fAsync */);
     275    handleResizeCompletedEMT();
    276276
    277277    return VINF_SUCCESS;
     
    284284 *  @thread EMT
    285285 */
    286 void Display::handleResizeCompletedEMT (bool fAsync)
     286void Display::handleResizeCompletedEMT (void)
    287287{
    288288    LogFlowFunc(("\n"));
     
    298298
    299299        mpDrv->pUpPort->pfnSetRenderVRAM (mpDrv->pUpPort, newPixelFormat == FramebufferPixelFormat_PixelFormatDefault);
    300 
    301         /* Unlock framebuffer. */
    302         mFramebuffer->Unlock();
    303300    }
    304301
     
    322319    bool f = ASMAtomicCmpXchgU32 (&mu32ResizeStatus, ResizeStatus_Void, ResizeStatus_UpdateDisplayData);
    323320    AssertRelease(f);NOREF(f);
    324 
    325     if (fAsync)
    326     {
    327         /* Repaint the display, but only if the resize was asynchronous. That is only
    328          * when VINF_VGA_RESIZE_IN_PROGRESS was returned to the VGA device and VM continued
    329          * to run during the framebuffer resize. */
    330         mpDrv->pUpPort->pfnUpdateDisplayAll(mpDrv->pUpPort);
     321   
     322    if (!mFramebuffer.isNull())
     323    {
     324        /* Unlock framebuffer after evrything is done. */
     325        mFramebuffer->Unlock();
    331326    }
    332327}
     
    18001795        LogFlowFunc (("ResizeStatus_UpdateDisplayData\n"));
    18011796        /* The framebuffer was resized and display data need to be updated. */
    1802         pDisplay->handleResizeCompletedEMT (true /* fAsync */);
     1797        pDisplay->handleResizeCompletedEMT ();
    18031798        /* Continue with normal processing because the status here is ResizeStatus_Void. */
    18041799        Assert (pDisplay->mu32ResizeStatus == ResizeStatus_Void);
     1800        /* Repaint the display because VM continued to run during the framebuffer resize. */
     1801        if (!pDisplay->mFramebuffer.isNull())
     1802            pDrv->pUpPort->pfnUpdateDisplayAll(pDrv->pUpPort);
     1803        /* Ignore the refresh to replay the logic. */
     1804        return;
    18051805    }
    18061806    else if (u32ResizeStatus == ResizeStatus_InProgress)
  • trunk/src/VBox/Main/include/DisplayImpl.h

    r2212 r2219  
    185185    void vbvaReleaseCmd (VBVACMDHDR *pHdr, int32_t cbCmd);
    186186
    187     void handleResizeCompletedEMT (bool fAsync);
     187    void handleResizeCompletedEMT (void);
    188188    volatile uint32_t mu32ResizeStatus;
    189189   
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