Changeset 48726 in vbox for trunk/src/VBox/HostServices/SharedOpenGL/crserverlib
- Timestamp:
- Sep 27, 2013 10:19:54 AM (11 years ago)
- Location:
- trunk/src/VBox/HostServices/SharedOpenGL/crserverlib
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server.h
r48719 r48726 119 119 void crServerMuralVisibleRegion( CRMuralInfo *mural, GLint cRects, const GLint *pRects ); 120 120 void crServerMuralShow( CRMuralInfo *mural, GLint state ); 121 int crServerMuralSynchRootVr(CRMuralInfo *mural );121 int crServerMuralSynchRootVr(CRMuralInfo *mural, bool *pfChanged); 122 122 123 123 GLint crServerGenerateID(GLint *pCounter); -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_main.c
r48719 r48726 332 332 #endif 333 333 334 cr_server.bUseMultipleContexts = (crGetenv( "CR_SERVER_ENABLE_MULTIPLE_CONTEXTS" ) != NULL);334 // cr_server.bUseMultipleContexts = (crGetenv( "CR_SERVER_ENABLE_MULTIPLE_CONTEXTS" ) != NULL); 335 335 336 336 if (cr_server.bUseMultipleContexts) … … 443 443 #endif 444 444 445 cr_server.bUseMultipleContexts = (crGetenv( "CR_SERVER_ENABLE_MULTIPLE_CONTEXTS" ) != NULL);445 // cr_server.bUseMultipleContexts = (crGetenv( "CR_SERVER_ENABLE_MULTIPLE_CONTEXTS" ) != NULL); 446 446 447 447 if (cr_server.bUseMultipleContexts) … … 2849 2849 } 2850 2850 2851 rc = crServerMuralSynchRootVr(pMI );2851 rc = crServerMuralSynchRootVr(pMI, NULL); 2852 2852 if (!RT_SUCCESS(rc)) 2853 2853 { … … 2913 2913 2914 2914 crHashtableWalk(cr_server.muralTable, crVBoxServerSetRootVisibleRegionCB, NULL); 2915 #if 0 2915 2916 2916 for (i = 0; i < cr_server.screenCount; ++i) 2917 2917 { … … 2922 2922 CrDpRootUpdate(pDisplay); 2923 2923 } 2924 #endif 2924 2925 2925 return VINF_SUCCESS; 2926 2926 } -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_presenter.cpp
r48719 r48726 47 47 } 48 48 49 crServerMuralVisibleRegion(&pDisplay->Mural, 0, NULL); 49 crServerWindowVisibleRegion(&pDisplay->Mural); 50 crServerDEntryAllVibleRegions(&pDisplay->Mural); 51 50 52 crServerMuralShow(&pDisplay->Mural, GL_TRUE); 51 53 … … 226 228 uint32_t cRects; 227 229 const RTRECT *pRects; 228 rc = CrVrScrCompositorRegionsGet(&pDisplay->Mural.Compositor, &cRects, NULL, &pRects, NULL); 229 if (RT_SUCCESS(rc)) 230 crServerMuralVisibleRegion(&pDisplay->Mural, cRects, (GLint *)pRects); 230 bool fChanged = true; 231 if (pDisplay->Mural.fRootVrOn) 232 { 233 int rc = crServerMuralSynchRootVr(&pDisplay->Mural, &fChanged); 234 if (!RT_SUCCESS(rc)) 235 { 236 crWarning("crServerMuralSynchRootVr failed, rc %d", rc); 237 fChanged = false; 238 } 239 } 240 241 if (fChanged) 242 crServerWindowVisibleRegion(&pDisplay->Mural); 243 244 crServerDEntryAllVibleRegions(&pDisplay->Mural); 245 246 Assert(!pReplacedScrEntry); 247 } 248 else if (fChangeFlags & VBOXVR_COMPOSITOR_CF_ENTRY_REGIONS_CHANGED) 249 { 250 if (fChangeFlags & VBOXVR_COMPOSITOR_CF_ENTRY_REPLACED) 251 { 252 Assert(pReplacedScrEntry); 253 Assert(pEntry); 254 if (pDisplay->Mural.fRootVrOn) 255 { 256 CR_DISPLAY_ENTRY *pReplacedDEntry = CR_DENTRY_FROM_CENTRY(pReplacedScrEntry); 257 Assert(CrVrScrCompositorEntryIsUsed(&pReplacedDEntry->RootVrCEntry)); 258 Assert(!CrVrScrCompositorEntryIsUsed(&pEntry->RootVrCEntry)); 259 CrVrScrCompositorEntryInit(&pEntry->RootVrCEntry, CrVrScrCompositorEntryTexGet(&pEntry->CEntry), NULL); 260 CrVrScrCompositorEntryFlagsSet(&pEntry->RootVrCEntry, CrVrScrCompositorEntryFlagsGet(&pEntry->CEntry)); 261 CrVrScrCompositorEntryReplace(&pDisplay->Mural.RootVrCompositor, &pReplacedDEntry->RootVrCEntry, &pEntry->RootVrCEntry); 262 } 263 } 231 264 else 232 crWarning("CrVrScrCompositorRegionsGet failed, rc %d", rc); 233 234 Assert(!pReplacedScrEntry); 235 } 236 else if (fChangeFlags & VBOXVR_COMPOSITOR_CF_ENTRY_REPLACED) 237 { 238 Assert(pReplacedScrEntry); 265 { 266 Assert(!pReplacedScrEntry); 267 if (pDisplay->Mural.fRootVrOn) 268 { 269 bool fChanged = false; 270 int rc = crServerMuralSynchRootVr(&pDisplay->Mural, &fChanged); 271 if (RT_SUCCESS(rc)) 272 { 273 if (fChanged) 274 crServerWindowVisibleRegion(&pDisplay->Mural); 275 } 276 else 277 crWarning("crServerMuralSynchRootVr failed, rc %d", rc); 278 } 279 } 239 280 } 240 281 else 241 282 { 283 Assert(!(fChangeFlags & VBOXVR_COMPOSITOR_CF_ENTRY_REPLACED)); 242 284 Assert(!pReplacedScrEntry); 243 285 } -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_window.c
r48095 r48726 216 216 uint32_t cRects; 217 217 const RTRECT *pRects; 218 int rc = crServerMuralSynchRootVr(mural );218 int rc = crServerMuralSynchRootVr(mural, NULL); 219 219 if (RT_SUCCESS(rc)) 220 220 { … … 504 504 Assert(!CrVrScrCompositorEntryIsUsed(&pDEntry->RootVrCEntry)); 505 505 CrVrScrCompositorEntryInit(&pDEntry->RootVrCEntry, CrVrScrCompositorEntryTexGet(pEntry), NULL); 506 CrVrScrCompositorEntryFlagsSet(&pDEntry->RootVrCEntry, CrVrScrCompositorEntryFlagsGet(pEntry)); 506 507 return &pDEntry->RootVrCEntry; 507 508 } 508 509 509 int crServerMuralSynchRootVr(CRMuralInfo *mural )510 int crServerMuralSynchRootVr(CRMuralInfo *mural, bool *pfChanged) 510 511 { 511 512 int rc; … … 517 518 CrVrScrCompositorClear(&mural->RootVrCompositor); 518 519 519 rc = CrVrScrCompositorIntersectedList(&mural->Compositor, &cr_server.RootVr, &mural->RootVrCompositor, crServerMuralGetRootVrCEntry, NULL, NULL);520 rc = CrVrScrCompositorIntersectedList(&mural->Compositor, &cr_server.RootVr, &mural->RootVrCompositor, crServerMuralGetRootVrCEntry, NULL, pfChanged); 520 521 if (!RT_SUCCESS(rc)) 521 522 { … … 609 610 if (mural->fRootVrOn) 610 611 { 611 rc = crServerMuralSynchRootVr(mural );612 rc = crServerMuralSynchRootVr(mural, NULL); 612 613 if (!RT_SUCCESS(rc)) 613 614 { … … 693 694 if (mural->fRootVrOn) 694 695 { 695 int rc = crServerMuralSynchRootVr(mural );696 int rc = crServerMuralSynchRootVr(mural, NULL); 696 697 if (RT_SUCCESS(rc)) 697 698 { … … 764 765 } 765 766 766 if (mural->fUseDefaultDEntry) 767 { 768 /* 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 */ 769 /* the compositor lock is not needed actually since we have prevented renderspu from using the compositor */ 770 /* CrVrScrCompositorLock(&mural->Compositor); */ 771 rc = CrVrScrCompositorEntryRegionsSet(&mural->Compositor, &mural->DefaultDEntry.CEntry, NULL, cRects, (const RTRECT *)pRects, false, &fRegionsChanged); 772 /*CrVrScrCompositorUnlock(&mural->Compositor);*/ 773 if (!RT_SUCCESS(rc)) 774 { 775 crWarning("CrVrScrCompositorEntryRegionsSet failed, rc %d", rc); 776 goto end; 777 } 778 } 779 else 780 { 781 fRegionsChanged = true; 767 Assert(mural->fUseDefaultDEntry); 768 /* 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 */ 769 /* the compositor lock is not needed actually since we have prevented renderspu from using the compositor */ 770 /* CrVrScrCompositorLock(&mural->Compositor); */ 771 rc = CrVrScrCompositorEntryRegionsSet(&mural->Compositor, &mural->DefaultDEntry.CEntry, NULL, cRects, (const RTRECT *)pRects, false, &fRegionsChanged); 772 /*CrVrScrCompositorUnlock(&mural->Compositor);*/ 773 if (!RT_SUCCESS(rc)) 774 { 775 crWarning("CrVrScrCompositorEntryRegionsSet failed, rc %d", rc); 776 goto end; 782 777 } 783 778 … … 786 781 if (mural->fRootVrOn) 787 782 { 788 rc = crServerMuralSynchRootVr(mural );783 rc = crServerMuralSynchRootVr(mural, NULL); 789 784 if (!RT_SUCCESS(rc)) 790 785 {
Note:
See TracChangeset
for help on using the changeset viewer.