VirtualBox

Ignore:
Timestamp:
Jul 1, 2013 2:02:37 PM (12 years ago)
Author:
vboxsync
Message:

crOpenGL: TexPresent fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_window.c

    r46801 r46885  
    1717}
    1818
    19 GLint crServerMuralInit(CRMuralInfo *mural, const char *dpyName, GLint visBits, GLint preloadWinID, GLboolean fSetVRegs)
     19GLint crServerMuralInit(CRMuralInfo *mural, const char *dpyName, GLint visBits, GLint preloadWinID, GLboolean fUseDefaultDEntry)
    2020{
    2121    CRMuralInfo *defaultMural;
     
    2323    GLint windowID = -1;
    2424    GLint spuWindow;
    25     VBOXVR_TEXTURE Tex = {0};
    2625    int rc;
    2726
    2827    crMemset(mural, 0, sizeof (*mural));
    2928
    30     rc = CrVrScrCompositorInit(&mural->Compositor);
    31     if (!RT_SUCCESS(rc))
    32     {
    33         crWarning("CrVrScrCompositorInit failed, rc %d", rc);
    34         return -1;
    35     }
     29    CrVrScrCompositorInit(&mural->Compositor);
    3630
    3731    if (cr_server.fRootVrOn)
    3832    {
    39         rc = CrVrScrCompositorInit(&mural->RootVrCompositor);
    40         if (!RT_SUCCESS(rc))
    41         {
    42             crWarning("CrVrScrCompositorInit failed, rc %d", rc);
    43             return -1;
    44         }
     33        CrVrScrCompositorInit(&mural->RootVrCompositor);
    4534    }
    4635
     
    5039    spuWindow = cr_server.head_spu->dispatch_table.WindowCreate( dpyName, visBits );
    5140    if (spuWindow < 0) {
    52         CrVrScrCompositorTerm(&mural->Compositor);
     41        CrVrScrCompositorClear(&mural->Compositor);
    5342        if (cr_server.fRootVrOn)
    54             CrVrScrCompositorTerm(&mural->RootVrCompositor);
     43            CrVrScrCompositorClear(&mural->RootVrCompositor);
    5544        return spuWindow;
    5645    }
     
    5948    cr_server.head_spu->dispatch_table.GetChromiumParametervCR(GL_WINDOW_SIZE_CR, spuWindow, GL_INT, 2, dims);
    6049
    61     Tex.width = dims[0];
    62     Tex.height = dims[1];
    63     Tex.target = GL_TEXTURE_2D;
    64     Tex.hwid = 0;
    65     CrVrScrCompositorEntryInit(&mural->CEntry, &Tex);
    66 
    67     if (cr_server.fRootVrOn)
    68     {
    69         CrVrScrCompositorEntryInit(&mural->RootVrCEntry, &Tex);
    70         mural->fRootVrOn = GL_TRUE;
     50    if (fUseDefaultDEntry)
     51    {
     52        VBOXVR_TEXTURE Tex = {0};
     53        Tex.width = dims[0];
     54        Tex.height = dims[1];
     55        Tex.target = GL_TEXTURE_2D;
     56        Tex.hwid = 0;
     57        CrVrScrCompositorEntryInit(&mural->DefaultDEntry.CEntry, &Tex);
     58
     59        if (cr_server.fRootVrOn)
     60        {
     61            CrVrScrCompositorEntryInit(&mural->DefaultDEntry.RootVrCEntry, &Tex);
     62            mural->fRootVrOn = GL_TRUE;
     63        }
    7164    }
    7265
     
    8174    mural->screenId = 0;
    8275    mural->fHasParentWindow = !!cr_server.screen[0].winID;
    83     mural->bVisible = cr_server.bWindowsInitiallyHidden;
     76    mural->bVisible = !cr_server.bWindowsInitiallyHidden;
    8477    mural->fPresentMode = CR_SERVER_REDIR_F_NONE;
    8578
     
    10295    CR_STATE_SHAREDOBJ_USAGE_INIT(mural);
    10396
    104     if (fSetVRegs)
     97    if (fUseDefaultDEntry)
    10598    {
    10699        RTRECT Rect;
     
    109102        Rect.yTop = 0;
    110103        Rect.yBottom = mural->height;
    111         rc = CrVrScrCompositorEntryRegionsSet(&mural->Compositor, &mural->CEntry, NULL, 1, &Rect, NULL);
     104        rc = CrVrScrCompositorEntryRegionsSet(&mural->Compositor, &mural->DefaultDEntry.CEntry, NULL, 1, &Rect, false, NULL);
    112105        if (!RT_SUCCESS(rc))
    113106        {
     
    123116        uint32_t cRects;
    124117        const RTRECT *pRects;
    125         int rc = crServerMuralSynchRootVr(mural, &cRects, &pRects);
     118        int rc = crServerMuralSynchRootVr(mural);
    126119        if (RT_SUCCESS(rc))
    127120        {
    128             if (cRects != 1
    129                     || pRects[0].xLeft != 0 || pRects[0].yTop != 0
    130                     || pRects[0].xRight != mural->width || pRects[0].yBottom != mural->height)
    131             {
    132                 /* do visible rects only ig they differ from the default */
    133                 cr_server.head_spu->dispatch_table.WindowVisibleRegion(mural->spuWindow, cRects, (const GLint*)pRects);
     121            rc = CrVrScrCompositorRegionsGet(&mural->RootVrCompositor, &cRects, NULL, &pRects, NULL);
     122            if (RT_SUCCESS(rc))
     123            {
     124                if (cRects != 1
     125                        || pRects[0].xLeft != 0 || pRects[0].yTop != 0
     126                        || pRects[0].xRight != mural->width || pRects[0].yBottom != mural->height)
     127                {
     128                    /* do visible rects only ig they differ from the default */
     129                    cr_server.head_spu->dispatch_table.WindowVisibleRegion(mural->spuWindow, cRects, (const GLint*)pRects);
     130                }
     131            }
     132            else
     133            {
     134                crWarning("CrVrScrCompositorRegionsGet failed, rc %d", rc);
    134135            }
    135136        }
     
    296297        crFree(mural->CreateInfo.pszDpyName);
    297298
    298     CrVrScrCompositorTerm(&mural->Compositor);
     299    CrVrScrCompositorClear(&mural->Compositor);
    299300
    300301    if (mural->fRootVrOn)
    301         CrVrScrCompositorTerm(&mural->RootVrCompositor);
     302        CrVrScrCompositorClear(&mural->RootVrCompositor);
    302303}
    303304
     
    401402}
    402403
    403 int crServerMuralSynchRootVr(CRMuralInfo *mural, uint32_t *pcRects, const RTRECT **ppRects)
     404#define CR_DENTRY_FROM_CENTRY(_pCentry) ((CR_DISPLAY_ENTRY*)((uint8_t*)(_pCentry) - RT_OFFSETOF(CR_DISPLAY_ENTRY, CEntry)))
     405
     406static DECLCALLBACK(VBOXVR_SCR_COMPOSITOR_ENTRY*) crServerMuralGetRootVrCEntry(VBOXVR_SCR_COMPOSITOR_ENTRY*pEntry, void *pvContext)
     407{
     408    CR_DISPLAY_ENTRY *pDEntry = CR_DENTRY_FROM_CENTRY(pEntry);
     409    CrVrScrCompositorEntryInit(&pDEntry->RootVrCEntry, CrVrScrCompositorEntryTexGet(pEntry));
     410    return &pDEntry->RootVrCEntry;
     411}
     412
     413int crServerMuralSynchRootVr(CRMuralInfo *mural)
    404414{
    405415    int rc;
    406416
    407     rc = CrVrScrCompositorEntryRegionsGet(&mural->Compositor, &mural->CEntry, pcRects, NULL, ppRects);
     417    crServerVBoxRootVrTranslateForMural(mural);
     418
     419    rc = CrVrScrCompositorIntersectedList(&mural->Compositor, &cr_server.RootVr, &mural->RootVrCompositor, crServerMuralGetRootVrCEntry, NULL, NULL);
    408420    if (!RT_SUCCESS(rc))
    409421    {
    410         crWarning("CrVrScrCompositorEntryRegionsGet failed, rc %d", rc);
    411         return rc;
    412     }
    413 
    414     rc = CrVrScrCompositorEntryRegionsSet(&mural->RootVrCompositor, &mural->RootVrCEntry, NULL, *pcRects, *ppRects, NULL);
    415     if (!RT_SUCCESS(rc))
    416     {
    417         crWarning("CrVrScrCompositorEntryRegionsSet failed, rc %d", rc);
    418         return rc;
    419     }
    420 
    421     crServerVBoxRootVrTranslateForMural(mural);
    422     rc = CrVrScrCompositorEntryListIntersect(&mural->RootVrCompositor, &mural->RootVrCEntry, &cr_server.RootVr, NULL);
    423     if (!RT_SUCCESS(rc))
    424     {
    425         crWarning("CrVrScrCompositorEntryRegionsSet failed, rc %d", rc);
    426         return rc;
    427     }
    428 
    429     rc = CrVrScrCompositorEntryRegionsGet(&mural->RootVrCompositor, &mural->RootVrCEntry, pcRects, NULL, ppRects);
    430     if (!RT_SUCCESS(rc))
    431     {
    432         crWarning("CrVrScrCompositorEntryRegionsGet failed, rc %d", rc);
     422        crWarning("CrVrScrCompositorIntersectedList failed, rc %d", rc);
    433423        return rc;
    434424    }
     
    468458    /* the compositor lock is not needed actually since we have prevented renderspu from using the compositor */
    469459    /* CrVrScrCompositorLock(&mural->Compositor); */
    470     if (!mural->bReceivedRects)
    471     {
    472         rc = CrVrScrCompositorEntryRemove(&mural->Compositor, &mural->CEntry);
    473         if (!RT_SUCCESS(rc))
    474         {
    475             crWarning("CrVrScrCompositorEntryRemove failed, rc %d", rc);
    476             goto end;
    477         }
    478         CrVrScrCompositorEntryInit(&mural->CEntry, &Tex);
    479         /* initially set regions to all visible since this is what some guest assume
    480          * and will not post any more visible regions command */
    481         Rect.xLeft = 0;
    482         Rect.xRight = width;
    483         Rect.yTop = 0;
    484         Rect.yBottom = height;
    485         rc = CrVrScrCompositorEntryRegionsSet(&mural->Compositor, &mural->CEntry, NULL, 1, &Rect, NULL);
    486         if (!RT_SUCCESS(rc))
    487         {
    488             crWarning("CrVrScrCompositorEntryRegionsSet failed, rc %d", rc);
    489             goto end;
     460    if (mural->fUseDefaultDEntry)
     461    {
     462        if (!mural->bReceivedRects)
     463        {
     464            rc = CrVrScrCompositorEntryRemove(&mural->Compositor, &mural->DefaultDEntry.CEntry);
     465            if (!RT_SUCCESS(rc))
     466            {
     467                crWarning("CrVrScrCompositorEntryRemove failed, rc %d", rc);
     468                goto end;
     469            }
     470            CrVrScrCompositorEntryInit(&mural->DefaultDEntry.CEntry, &Tex);
     471            /* initially set regions to all visible since this is what some guest assume
     472             * and will not post any more visible regions command */
     473            Rect.xLeft = 0;
     474            Rect.xRight = width;
     475            Rect.yTop = 0;
     476            Rect.yBottom = height;
     477            rc = CrVrScrCompositorEntryRegionsSet(&mural->Compositor, &mural->DefaultDEntry.CEntry, NULL, 1, &Rect, false, NULL);
     478            if (!RT_SUCCESS(rc))
     479            {
     480                crWarning("CrVrScrCompositorEntryRegionsSet failed, rc %d", rc);
     481                goto end;
     482            }
     483        }
     484        else
     485        {
     486            rc = CrVrScrCompositorEntryTexUpdate(&mural->Compositor, &mural->DefaultDEntry.CEntry, &Tex);
     487            if (!RT_SUCCESS(rc))
     488            {
     489                crWarning("CrVrScrCompositorEntryTexUpdate failed, rc %d", rc);
     490                goto end;
     491            }
    490492        }
    491493    }
    492494    else
    493495    {
    494         rc = CrVrScrCompositorEntryTexUpdate(&mural->Compositor, &mural->CEntry, &Tex);
    495         if (!RT_SUCCESS(rc))
    496         {
    497             crWarning("CrVrScrCompositorEntryTexUpdate failed, rc %d", rc);
    498             goto end;
    499         }
     496        CrVrScrCompositorClear(&mural->Compositor);
    500497    }
    501498
     
    512509    }
    513510
    514     rc = CrVrScrCompositorEntryRegionsGet(&mural->Compositor, &mural->CEntry, &cRects, NULL, &pRects);
     511    rc = CrVrScrCompositorRegionsGet(&mural->Compositor, &cRects, NULL, &pRects, NULL);
    515512    if (!RT_SUCCESS(rc))
    516513    {
    517         crWarning("CrVrScrCompositorEntryRegionsGet failed, rc %d", rc);
     514        crWarning("CrVrScrCompositorRegionsGet failed, rc %d", rc);
    518515        goto end;
    519516    }
     
    521518    if (mural->fRootVrOn)
    522519    {
    523         rc = CrVrScrCompositorEntryRemove(&mural->RootVrCompositor, &mural->RootVrCEntry);
     520        rc = crServerMuralSynchRootVr(mural);
    524521        if (!RT_SUCCESS(rc))
    525522        {
    526             crWarning("CrVrScrCompositorEntryRemove failed, rc %d", rc);
     523            crWarning("crServerMuralSynchRootVr failed, rc %d", rc);
    527524            goto end;
    528525        }
    529         CrVrScrCompositorEntryInit(&mural->RootVrCEntry, &Tex);
    530 
    531         rc = CrVrScrCompositorEntryRegionsSet(&mural->RootVrCompositor, &mural->RootVrCEntry, NULL, cRects, pRects, NULL);
     526
     527        rc = CrVrScrCompositorRegionsGet(&mural->RootVrCompositor, &cRects, NULL, &pRects, NULL);
    532528        if (!RT_SUCCESS(rc))
    533529        {
    534             crWarning("CrVrScrCompositorEntryRegionsSet failed, rc %d", rc);
     530            crWarning("CrVrScrCompositorRegionsGet failed, rc %d", rc);
    535531            goto end;
    536532        }
    537 
    538         crServerVBoxRootVrTranslateForMural(mural);
    539         rc = CrVrScrCompositorEntryListIntersect(&mural->RootVrCompositor, &mural->RootVrCEntry, &cr_server.RootVr, NULL);
    540         if (!RT_SUCCESS(rc))
    541         {
    542             crWarning("CrVrScrCompositorEntryRegionsSet failed, rc %d", rc);
    543             goto end;
    544         }
    545 
    546         rc = CrVrScrCompositorEntryRegionsGet(&mural->RootVrCompositor, &mural->RootVrCEntry, &cRects, NULL, &pRects);
    547         if (!RT_SUCCESS(rc))
    548         {
    549             crWarning("CrVrScrCompositorEntryRegionsGet failed, rc %d", rc);
    550             goto end;
    551         }
    552     }
    553     else
    554     {
    555533    }
    556534
     
    563541    if (mural->pvOutputRedirectInstance)
    564542    {
    565         if (mural->fRootVrOn)
    566         {
    567             rc = CrVrScrCompositorEntryRegionsGet(&mural->Compositor, &mural->CEntry, &cRects, NULL, &pRects);
     543        /* always get non-stretched rects for output redirect */
     544//        if (mural->fRootVrOn)
     545        {
     546            rc = CrVrScrCompositorRegionsGet(&mural->Compositor, &cRects, NULL, NULL, &pRects);
    568547            if (!RT_SUCCESS(rc))
    569548            {
    570                 crWarning("CrVrScrCompositorEntryRegionsGet failed, rc %d", rc);
     549                crWarning("CrVrScrCompositorRegionsGet failed, rc %d", rc);
    571550                goto end;
    572551            }
     
    609588}
    610589
    611 
    612 void SERVER_DISPATCH_APIENTRY
    613 crServerDispatchWindowPosition( GLint window, GLint x, GLint y )
    614 {
    615     CRMuralInfo *mural = (CRMuralInfo *) crHashtableSearch(cr_server.muralTable, window);
     590void crServerMutalPosition(CRMuralInfo *mural, GLint x, GLint y)
     591{
    616592    GLboolean fForcePresent = GL_FALSE;
    617593    /*  crDebug("CRServer: Window %d pos %d, %d", window, x, y);*/
    618     if (!mural) {
    619 #if EXTRA_WARN
    620          crWarning("CRServer: invalid window %d passed to WindowPosition()", window);
    621 #endif
    622          return;
    623     }
     594
    624595//    if (mural->gX != x || mural->gY != y)
    625596    {
     
    648619            mural->gY = y;
    649620
    650             /* the compositor lock is not needed actually since we have prevented renderspu from using the compositor */
    651             /* CrVrScrCompositorLock(&mural->Compositor); */
    652621            /* no need to set position because the position is relative to window */
    653622            /*CrVrScrCompositorEntryPosSet(&mural->Compositor, &mural->CEntry, &Pos);*/
    654             /*CrVrScrCompositorUnlock(&mural->Compositor);*/
    655623
    656624            if (mural->fRootVrOn)
     
    658626                uint32_t cRects;
    659627                const RTRECT *pRects;
    660                 int rc = crServerMuralSynchRootVr(mural, &cRects, &pRects);
    661 
     628                int rc = crServerMuralSynchRootVr(mural);
    662629                if (RT_SUCCESS(rc))
    663630                {
    664                     cr_server.head_spu->dispatch_table.WindowVisibleRegion(mural->spuWindow, cRects, (const GLint*)pRects);
     631                    rc = CrVrScrCompositorRegionsGet(&mural->RootVrCompositor, &cRects, NULL, &pRects, NULL);
     632                    if (RT_SUCCESS(rc))
     633                    {
     634                        cr_server.head_spu->dispatch_table.WindowVisibleRegion(mural->spuWindow, cRects, (const GLint*)pRects);
     635                    }
     636                    else
     637                    {
     638                        crWarning("CrVrScrCompositorRegionsGet failed, rc %d", rc);
     639                    }
    665640                }
    666641                else
     
    679654
    680655void SERVER_DISPATCH_APIENTRY
    681 crServerDispatchWindowVisibleRegion( GLint window, GLint cRects, const GLint *pRects )
     656crServerDispatchWindowPosition( GLint window, GLint x, GLint y )
    682657{
    683658    CRMuralInfo *mural = (CRMuralInfo *) crHashtableSearch(cr_server.muralTable, window);
     659    if (!mural) {
     660#if EXTRA_WARN
     661         crWarning("CRServer: invalid window %d passed to WindowPosition()", window);
     662#endif
     663         return;
     664    }
     665    crServerMutalPosition(mural, x, y);
     666}
     667
     668void crServerMuralVisibleRegion( CRMuralInfo *mural, GLint cRects, const GLint *pRects )
     669{
    684670    GLboolean fForcePresent = crServerVBoxCompositionPresentNeeded(mural);
    685671    bool fRegionsChanged = false;
    686672    int rc = VINF_SUCCESS;
    687     if (!mural) {
    688 #if EXTRA_WARN
    689          crWarning("CRServer: invalid window %d passed to WindowVisibleRegion()", window);
    690 #endif
    691          return;
    692     }
    693673
    694674    /* since we're going to change the current compositor & the window we need to avoid
     
    722702    }
    723703
    724     /* NOTE: we can do it even if !(mural->fPresentMode & CR_SERVER_REDIR_F_DISPLAY) to make sure the compositor data is always up to date */
    725     /* the compositor lock is not needed actually since we have prevented renderspu from using the compositor */
    726     /* CrVrScrCompositorLock(&mural->Compositor); */
    727     rc = CrVrScrCompositorEntryRegionsSet(&mural->Compositor, &mural->CEntry, NULL, cRects, (const RTRECT *)pRects, &fRegionsChanged);
    728     /*CrVrScrCompositorUnlock(&mural->Compositor);*/
    729     if (!RT_SUCCESS(rc))
    730     {
    731         crWarning("CrVrScrCompositorEntryRegionsSet failed, rc %d", rc);
    732         goto end;
     704    if (mural->fUseDefaultDEntry)
     705    {
     706        /* NOTE: we can do it even if !(mural->fPresentMode & CR_SERVER_REDIR_F_DISPLAY) to make sure the compositor data is always up to date */
     707        /* the compositor lock is not needed actually since we have prevented renderspu from using the compositor */
     708        /* CrVrScrCompositorLock(&mural->Compositor); */
     709        rc = CrVrScrCompositorEntryRegionsSet(&mural->Compositor, &mural->DefaultDEntry.CEntry, NULL, cRects, (const RTRECT *)pRects, false, &fRegionsChanged);
     710        /*CrVrScrCompositorUnlock(&mural->Compositor);*/
     711        if (!RT_SUCCESS(rc))
     712        {
     713            crWarning("CrVrScrCompositorEntryRegionsSet failed, rc %d", rc);
     714            goto end;
     715        }
     716    }
     717    else
     718    {
     719        fRegionsChanged = true;
    733720    }
    734721
     
    740727        if (mural->fRootVrOn)
    741728        {
    742             rc = CrVrScrCompositorEntryRegionsSet(&mural->RootVrCompositor, &mural->RootVrCEntry, NULL, cRects, (const RTRECT *)pRects, NULL);
     729            rc = rc = crServerMuralSynchRootVr(mural);
    743730            if (!RT_SUCCESS(rc))
    744731            {
    745                 crWarning("CrVrScrCompositorEntryRegionsSet failed, rc %d", rc);
     732                crWarning("crServerMuralSynchRootVr failed, rc %d", rc);
    746733                goto end;
    747734            }
    748735
    749             crServerVBoxRootVrTranslateForMural(mural);
    750             rc = CrVrScrCompositorEntryListIntersect(&mural->RootVrCompositor, &mural->RootVrCEntry, &cr_server.RootVr, NULL);
     736            rc = CrVrScrCompositorRegionsGet(&mural->RootVrCompositor, &cRealRects, NULL, &pRealRects, NULL);
    751737            if (!RT_SUCCESS(rc))
    752738            {
    753                 crWarning("CrVrScrCompositorEntryRegionsSet failed, rc %d", rc);
     739                crWarning("CrVrScrCompositorRegionsGet failed, rc %d", rc);
    754740                goto end;
    755741            }
    756 
    757             rc = CrVrScrCompositorEntryRegionsGet(&mural->RootVrCompositor, &mural->RootVrCEntry, &cRealRects, NULL, &pRealRects);
     742        }
     743        else
     744        {
     745            rc = CrVrScrCompositorRegionsGet(&mural->Compositor, &cRealRects, NULL, &pRealRects, NULL);
    758746            if (!RT_SUCCESS(rc))
    759747            {
    760                 crWarning("CrVrScrCompositorEntryRegionsGet failed, rc %d", rc);
     748                crWarning("CrVrScrCompositorRegionsGet failed, rc %d", rc);
    761749                goto end;
    762750            }
    763751        }
    764         else
    765         {
    766             rc = CrVrScrCompositorEntryRegionsGet(&mural->Compositor, &mural->CEntry, &cRealRects, NULL, &pRealRects);
    767             if (!RT_SUCCESS(rc))
    768             {
    769                 crWarning("CrVrScrCompositorEntryRegionsGet failed, rc %d", rc);
    770                 goto end;
    771             }
    772         }
    773752
    774753        cr_server.head_spu->dispatch_table.WindowVisibleRegion(mural->spuWindow, cRealRects, (const GLint*)pRealRects);
     
    776755        if (mural->pvOutputRedirectInstance)
    777756        {
    778             if (mural->fRootVrOn)
    779             {
    780                 rc = CrVrScrCompositorEntryRegionsGet(&mural->Compositor, &mural->CEntry, &cRealRects, NULL, &pRealRects);
     757//            if (mural->fRootVrOn)
     758            {
     759                /* always get unstretched regions here */
     760                rc = CrVrScrCompositorRegionsGet(&mural->Compositor, &cRealRects, NULL, NULL, &pRealRects);
    781761                if (!RT_SUCCESS(rc))
    782762                {
    783                     crWarning("CrVrScrCompositorEntryRegionsGet failed, rc %d", rc);
     763                    crWarning("CrVrScrCompositorRegionsGet failed, rc %d", rc);
    784764                    goto end;
    785765                }
     
    792772    /* 3. re-set the compositor (see above comment) */
    793773    crServerVBoxCompositionDisableLeave(mural, fForcePresent);
     774}
     775
     776void SERVER_DISPATCH_APIENTRY
     777crServerDispatchWindowVisibleRegion( GLint window, GLint cRects, const GLint *pRects )
     778{
     779    CRMuralInfo *mural = (CRMuralInfo *) crHashtableSearch(cr_server.muralTable, window);
     780    if (!mural) {
     781#if EXTRA_WARN
     782         crWarning("CRServer: invalid window %d passed to WindowVisibleRegion()", window);
     783#endif
     784         return;
     785    }
     786
     787    crServerMuralVisibleRegion( mural, cRects, pRects );
     788}
     789
     790void crServerMuralShow( CRMuralInfo *mural, GLint state )
     791{
     792    if (mural->fPresentMode & CR_SERVER_REDIR_F_DISPLAY)
     793    {
     794        cr_server.head_spu->dispatch_table.WindowShow(mural->spuWindow, state);
     795
     796        if (state && mural->fHasParentWindow)
     797            crVBoxServerNotifyEvent(mural->screenId);
     798    }
     799
     800    mural->bVisible = !!state;
    794801}
    795802
     
    805812    }
    806813
    807     if (mural->fPresentMode & CR_SERVER_REDIR_F_DISPLAY)
    808     {
    809         cr_server.head_spu->dispatch_table.WindowShow(mural->spuWindow, state);
    810 
    811         if (state && mural->fHasParentWindow)
    812             crVBoxServerNotifyEvent(mural->screenId);
    813     }
    814 
    815     mural->bVisible = !!state;
    816 }
    817 
     814    crServerMuralShow( mural, state );
     815}
    818816
    819817GLint
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