VirtualBox

Changeset 49265 in vbox for trunk


Ignore:
Timestamp:
Oct 23, 2013 5:57:33 PM (11 years ago)
Author:
vboxsync
Message:

FE/Qt: Runtime UI: Quartz2D frame-buffer: Next iteration in EMT vs GUI thread sync; also build-fix for r90175.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBufferQuartz2D.cpp

    r49169 r49265  
    7676             (unsigned long)aCount));
    7777
     78    /* Make sure rectangles were passed: */
     79    if (!pRectangles)
     80    {
     81        LogRel2(("UIFrameBufferQuartz2D::SetVisibleRegion: Invalid pRectangles pointer!\n"));
     82
     83        return E_POINTER;
     84    }
     85
     86    /* Lock access to frame-buffer: */
     87    lock();
     88
    7889    /* Make sure frame-buffer is used: */
    79     if (isMarkedAsUnused())
     90    if (m_fIsMarkedAsUnused)
    8091    {
    8192        LogRel2(("UIFrameBufferQuartz2D::SetVisibleRegion: Ignored!\n"));
     93
     94        /* Unlock access to frame-buffer: */
     95        unlock();
    8296
    8397        /* Ignore SetVisibleRegion: */
    8498        return E_FAIL;
    8599    }
    86 
    87     /* Make sure rectangles were passed: */
    88     PRTRECT rects = (PRTRECT)pRectangles;
    89     if (!rects)
    90         return E_POINTER;
    91100
    92101    /** @todo r=bird: Is this thread safe? If I remember the code flow correctly, the
     
    108117        rgnRcts = (RegionRects *)RTMemAlloc(RT_OFFSETOF(RegionRects, rcts[allocated]));
    109118        if (!rgnRcts)
     119        {
     120            /* Unlock access to frame-buffer: */
     121            unlock();
     122
    110123            return E_OUTOFMEMORY;
     124        }
    111125        rgnRcts->allocated = allocated;
    112126    }
     
    115129    /* Compose region: */
    116130    QRegion reg;
     131    PRTRECT rects = (PRTRECT)pRectangles;
    117132    QRect vmScreenRect(0, 0, width(), height());
    118133    for (ULONG ind = 0; ind < aCount; ++ ind)
     
    153168    LogRel2(("UIFrameBufferQuartz2D::SetVisibleRegion: Sending to async-handler...\n"));
    154169    emit sigSetVisibleRegion(reg);
     170
     171    /* Unlock access to frame-buffer: */
     172    unlock();
    155173
    156174    /* Confirm SetVisibleRegion: */
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