VirtualBox

Changeset 46086 in vbox


Ignore:
Timestamp:
May 15, 2013 7:29:54 AM (12 years ago)
Author:
vboxsync
Message:

DisplayImpl: fix and cleanup for postponed seamless region update

File:
1 edited

Legend:

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

    r46075 r46086  
    834834        }
    835835        LogRelFlow(("[%d]: default format %d\n", uScreenId, pFBInfo->fDefaultFormat));
    836        
     836
    837837        /* Handle the case if there are some saved visible region that needs to be
    838838         * applied after the resize of the framebuffer is completed
    839839         */
    840840        SaveSeamlessRectLock();
    841         PRTRECT pSavedSeamlessRgn = pFBInfo->mpSavedVisibleRegion;
    842         uint32_t ucSavedSeamlessRgn = pFBInfo->mcSavedVisibleRegion;
     841        PRTRECT pSavedVisibleRegion = pFBInfo->mpSavedVisibleRegion;
     842        uint32_t cSavedVisibleRegion = pFBInfo->mcSavedVisibleRegion;
     843        pFBInfo->mpSavedVisibleRegion = NULL;
     844        pFBInfo->mcSavedVisibleRegion = 0;
    843845        SaveSeamlessRectUnLock();
    844         if (pSavedSeamlessRgn && ucSavedSeamlessRgn)
    845         {
    846             handleSetVisibleRegion(ucSavedSeamlessRgn, pSavedSeamlessRgn);
    847             SaveSeamlessRectLock();
    848             if (pFBInfo->mpSavedVisibleRegion)
    849                 RTMemFree(pFBInfo->mpSavedVisibleRegion);
    850             pFBInfo->mpSavedVisibleRegion = NULL;
    851             pFBInfo->mcSavedVisibleRegion = 0;
    852             SaveSeamlessRectUnLock();
    853         }
    854 
     846
     847        if (pSavedVisibleRegion)
     848        {
     849            handleSetVisibleRegion(cSavedVisibleRegion, pSavedVisibleRegion);
     850            RTMemFree(pSavedVisibleRegion);
     851        }
    855852
    856853#ifdef DEBUG_sunlover
     
    11301127                 */
    11311128                SaveSeamlessRectLock();
    1132                 if(pFBInfo->mpSavedVisibleRegion)
    1133                     RTMemFree(pFBInfo->mpSavedVisibleRegion);
    1134                
     1129                RTMemFree(pFBInfo->mpSavedVisibleRegion);
     1130
    11351131                pFBInfo->mpSavedVisibleRegion = (RTRECT *)RTMemAlloc( RT_MAX(cRect, 1)
    11361132                                                                     * sizeof (RTRECT));
     
    11421138                else
    11431139                {
    1144                     /* memory allocation failed */
    11451140                    pFBInfo->mcSavedVisibleRegion = 0;
    11461141                }
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