VirtualBox

Ignore:
Timestamp:
Mar 15, 2013 5:42:49 PM (12 years ago)
Author:
vboxsync
Message:

crOpenGL/osx: fix null visible regions

Location:
trunk/src/VBox/HostServices/SharedOpenGL
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server.h

    r45009 r45053  
    142142void crServerMuralFBOSwapBuffers(CRMuralInfo *mural);
    143143
    144 void crServerVBoxCompositionReenable(CRMuralInfo *mural);
     144void crServerVBoxCompositionReenable(CRMuralInfo *mural, bool fOnContentHide);
    145145void crServerVBoxCompositionDisable(CRMuralInfo *mural);
    146 void crServerVBoxCompositionPresent(CRMuralInfo *mural);
     146void crServerVBoxCompositionPresent(CRMuralInfo *mural, bool fOnContentHide);
    147147
    148148#define CR_SERVER_FBO_BB_IDX(_mural) ((_mural)->iBbBuffer)
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_muralfbo.c

    r45038 r45053  
    513513}
    514514
    515 void crServerVBoxCompositionPresent(CRMuralInfo *mural)
     515void crServerVBoxCompositionPresent(CRMuralInfo *mural, bool fOnContentHide)
    516516{
    517517    CRMuralInfo *currentMural = cr_server.currentMural;
     
    522522    CRASSERT(curCtx == crStateGetCurrent());
    523523
    524     if (!mural->bVisible)
    525     {
    526         return;
    527     }
    528 
    529     if (!mural->width || !mural->height)
    530     {
    531         return;
    532     }
    533 
    534     if (!CrVrScrCompositorEntryIsInList(&mural->CEntry))
    535         return;
     524    Assert(!CrVrScrCompositorIsEmpty(&mural->Compositor) == !fOnContentHide);
     525
     526    if (!fOnContentHide)
     527    {
     528        if (!mural->bVisible)
     529        {
     530            return;
     531        }
     532
     533        if (!mural->width || !mural->height)
     534        {
     535            return;
     536        }
     537
     538        if (!CrVrScrCompositorEntryIsInList(&mural->CEntry))
     539            return;
     540    }
    536541
    537542    if (currentMural)
     
    552557    crStateSwitchPostprocess(curCtx, NULL, idDrawFBO, idReadFBO);
    553558
    554     mural->fCompositorPresented = GL_TRUE;
    555 }
    556 
    557 void crServerVBoxCompositionReenable(CRMuralInfo *mural)
     559    mural->fCompositorPresented = !fOnContentHide;
     560}
     561
     562void crServerVBoxCompositionReenable(CRMuralInfo *mural, bool fOnContentHide)
    558563{
    559564    if (!mural->fCompositorPresented)
    560565        return;
    561566
    562     crServerVBoxCompositionPresent(mural);
     567    crServerVBoxCompositionPresent(mural, fOnContentHide);
    563568}
    564569
     
    595600    if (mural->fUseFBO == CR_SERVER_REDIR_FBO_BLT)
    596601    {
    597         crServerVBoxCompositionPresent(mural);
     602        crServerVBoxCompositionPresent(mural, false);
    598603        return;
    599604    }
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_window.c

    r45041 r45053  
    456456        if (mural->fUseFBO != CR_SERVER_REDIR_NONE)
    457457        {
    458             crServerVBoxCompositionReenable(mural);
     458            crServerVBoxCompositionReenable(mural, false);
    459459        }
    460460    }
     
    465465{
    466466    CRMuralInfo *mural = (CRMuralInfo *) crHashtableSearch(cr_server.muralTable, window);
     467    bool fContainedRegions;
    467468    if (!mural) {
    468469#if EXTRA_WARN
     
    486487    }
    487488
     489    fContainedRegions = !CrVrScrCompositorIsEmpty(&mural->Compositor);
    488490    /* 2. do necessary modifications (see above comment) */
    489491    /* NOTE: we can do it even if mural->fUseFBO = CR_SERVER_REDIR_NONE to make sure the compositor data is always up to date */
     
    523525    if (mural->fUseFBO != CR_SERVER_REDIR_NONE)
    524526    {
    525         crServerVBoxCompositionReenable(mural);
     527        crServerVBoxCompositionReenable(mural, fContainedRegions && CrVrScrCompositorIsEmpty(&mural->Compositor));
    526528    }
    527529}
  • trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu.c

    r45048 r45053  
    644644    window = (WindowInfo *) crHashtableSearch(render_spu.windowTable, win);
    645645    if (window) {
     646#if !defined(RT_OS_DARWIN) || !defined(VBOX_WITH_COCOA_QT)
     647        if (CrVrScrCompositorIsEmpty(pCompositor))
     648            pCompositor = NULL;
     649#endif
    646650        renderspuVBoxCompositorSet( window, pCompositor);
    647651        if (pCompositor)
    648652        {
    649653            renderspu_SystemVBoxPresentComposition(window, pCompositor, pChangedEntry);
     654#if defined(RT_OS_DARWIN) && defined(VBOX_WITH_COCOA_QT)
     655            if (CrVrScrCompositorIsEmpty(pCompositor))
     656                renderspuVBoxCompositorSet( window, NULL);
     657#endif
    650658        }
    651659    }
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