Changeset 47623 in vbox
- Timestamp:
- Aug 8, 2013 9:19:43 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 87824
- Location:
- trunk/src/VBox
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/include/cr_server.h
r47577 r47623 209 209 VBOXVR_SCR_COMPOSITOR_ENTRY CEntry; 210 210 VBOXVR_SCR_COMPOSITOR_ENTRY RootVrCEntry; 211 void *pvORInstance; 212 GLuint idPBO; 211 213 } CR_DISPLAY_ENTRY, *PCR_DISPLAY_ENTRY; 212 214 /**/ … … 238 240 GLuint aidColorTexs[2]; 239 241 240 void *pv OutputRedirectInstance;242 void *pvReserved; 241 243 242 244 CRCreateInfo_t CreateInfo; … … 250 252 GLuint idDepthStencilRB; 251 253 GLuint fboWidth, fboHeight; 252 GLuint idPBO;253 254 254 255 GLuint cDisabled; … … 260 261 GLboolean fRootVrOn; 261 262 GLboolean fForcePresentState; 263 GLboolean fOrPresentOnReenable; 262 264 263 265 GLboolean fUseDefaultDEntry; … … 364 366 { 365 367 CRHashTable * pTexIdToDemInfoMap; 368 uint32_t cEntered; 369 RTLISTNODE ReleasedList; 366 370 } CR_DISPLAY_ENTRY_MAP, *PCR_DISPLAY_ENTRY_MAP; 367 371 … … 378 382 379 383 void CrHlpFreeTexImage(CRContext *pCurCtx, GLuint idPBO, void *pvData); 380 void* CrHlpGetTexImage(CRContext *pCurCtx, PVBOXVR_TEXTUREpTexture, GLuint idPBO, GLenum enmFormat);381 void CrHlpPutTexImage(CRContext *pCurCtx, PVBOXVR_TEXTUREpTexture, GLenum enmFormat, void *pvData);384 void* CrHlpGetTexImage(CRContext *pCurCtx, const VBOXVR_TEXTURE *pTexture, GLuint idPBO, GLenum enmFormat); 385 void CrHlpPutTexImage(CRContext *pCurCtx, const VBOXVR_TEXTURE *pTexture, GLenum enmFormat, void *pvData); 382 386 383 387 /* */ -
trunk/src/VBox/GuestHost/OpenGL/include/cr_vreg.h
r47566 r47623 384 384 return VBoxVrCompositorEntryIsInList(&pEntry->Ce); 385 385 } 386 VBOXVREGDECL(int) CrVrScrCompositorEntryRegionsAdd(PVBOXVR_SCR_COMPOSITOR pCompositor, PVBOXVR_SCR_COMPOSITOR_ENTRY pEntry, const RTPOINT *pPos, uint32_t cRegions, const RTRECT *paRegions, bool fPosRelated, uint32_t *pfChangeFlags);386 VBOXVREGDECL(int) CrVrScrCompositorEntryRegionsAdd(PVBOXVR_SCR_COMPOSITOR pCompositor, PVBOXVR_SCR_COMPOSITOR_ENTRY pEntry, const RTPOINT *pPos, uint32_t cRegions, const RTRECT *paRegions, bool fPosRelated, VBOXVR_SCR_COMPOSITOR_ENTRY **ppReplacedScrEntry, uint32_t *pfChangeFlags); 387 387 VBOXVREGDECL(int) CrVrScrCompositorEntryRegionsSet(PVBOXVR_SCR_COMPOSITOR pCompositor, PVBOXVR_SCR_COMPOSITOR_ENTRY pEntry, const RTPOINT *pPos, uint32_t cRegions, const RTRECT *paRegions, bool fPosRelated, bool *pfChanged); 388 388 VBOXVREGDECL(int) CrVrScrCompositorEntryListIntersect(PVBOXVR_SCR_COMPOSITOR pCompositor, PVBOXVR_SCR_COMPOSITOR_ENTRY pEntry, const VBOXVR_LIST *pList2, bool *pfChanged); -
trunk/src/VBox/GuestHost/OpenGL/util/vreg.cpp
r47566 r47623 1862 1862 1863 1863 1864 static int crVrScrCompositorEntryRegionsAdd(PVBOXVR_SCR_COMPOSITOR pCompositor, PVBOXVR_SCR_COMPOSITOR_ENTRY pEntry, uint32_t cRegions, const RTRECT *paRegions, uint32_t *pfChangedFlags)1864 static int crVrScrCompositorEntryRegionsAdd(PVBOXVR_SCR_COMPOSITOR pCompositor, PVBOXVR_SCR_COMPOSITOR_ENTRY pEntry, uint32_t cRegions, const RTRECT *paRegions, VBOXVR_SCR_COMPOSITOR_ENTRY **ppReplacedScrEntry, uint32_t *pfChangedFlags) 1865 1865 { 1866 1866 uint32_t fChangedFlags = 0; … … 1900 1900 if (pfChangedFlags) 1901 1901 *pfChangedFlags = fChangedFlags; 1902 1903 if (ppReplacedScrEntry) 1904 *ppReplacedScrEntry = pReplacedScrEntry; 1905 1902 1906 return VINF_SUCCESS; 1903 1907 } … … 1987 1991 } 1988 1992 1989 VBOXVREGDECL(int) CrVrScrCompositorEntryRegionsAdd(PVBOXVR_SCR_COMPOSITOR pCompositor, PVBOXVR_SCR_COMPOSITOR_ENTRY pEntry, const RTPOINT *pPos, uint32_t cRegions, const RTRECT *paRegions, bool fPosRelated, uint32_t *pfChangeFlags)1993 VBOXVREGDECL(int) CrVrScrCompositorEntryRegionsAdd(PVBOXVR_SCR_COMPOSITOR pCompositor, PVBOXVR_SCR_COMPOSITOR_ENTRY pEntry, const RTPOINT *pPos, uint32_t cRegions, const RTRECT *paRegions, bool fPosRelated, VBOXVR_SCR_COMPOSITOR_ENTRY **ppReplacedScrEntry, uint32_t *pfChangeFlags) 1990 1994 { 1991 1995 int rc; … … 2028 2032 } 2029 2033 2030 rc = crVrScrCompositorEntryRegionsAdd(pCompositor, pEntry, cRegions, paRegions, &fChangeFlags);2034 rc = crVrScrCompositorEntryRegionsAdd(pCompositor, pEntry, cRegions, paRegions, ppReplacedScrEntry, &fChangeFlags); 2031 2035 if (!RT_SUCCESS(rc)) 2032 2036 { … … 2054 2058 if (fChangeFlags & VBOXVR_COMPOSITOR_CF_ENTRY_REPLACED) 2055 2059 fPosChanged = false; 2060 else if (ppReplacedScrEntry) 2061 *ppReplacedScrEntry = NULL; 2056 2062 2057 2063 if (pfChangeFlags) -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server.h
r47602 r47623 129 129 CRMuralInfo * crServerGetDummyMural(GLint visualBits); 130 130 131 void crServerSetupOutputRedirect(CRMuralInfo *mural); 131 void crServerPresentOutputRedirect(CRMuralInfo *pMural); 132 void crServerOutputRedirectCheckEnableDisable(CRMuralInfo *pMural); 133 132 134 void crServerCheckMuralGeometry(CRMuralInfo *mural); 133 135 GLboolean crServerSupportRedirMuralFBO(void); … … 422 424 void CrDpEntryCleanup(PCR_DISPLAY pDisplay, PCR_DISPLAY_ENTRY pEntry); 423 425 int CrDpEntryRegionsSet(PCR_DISPLAY pDisplay, PCR_DISPLAY_ENTRY pEntry, const RTPOINT *pPos, uint32_t cRegions, const RTRECT *paRegions); 424 int CrDpEntryRegionsAdd(PCR_DISPLAY pDisplay, PCR_DISPLAY_ENTRY pEntry, const RTPOINT *pPos, uint32_t cRegions, const RTRECT *paRegions );426 int CrDpEntryRegionsAdd(PCR_DISPLAY pDisplay, PCR_DISPLAY_ENTRY pEntry, const RTPOINT *pPos, uint32_t cRegions, const RTRECT *paRegions, CR_DISPLAY_ENTRY_MAP *pMap); 425 427 void CrDpEntryRegionsClear(PCR_DISPLAY pDisplay); 426 428 DECLINLINE(bool) CrDpEntryIsUsed(PCR_DISPLAY_ENTRY pEntry) … … 436 438 int CrDemGlobalInit(); 437 439 void CrDemTeGlobalTerm(); 440 void CrDemEnter(PCR_DISPLAY_ENTRY_MAP pMap); 441 void CrDemLeave(PCR_DISPLAY_ENTRY_MAP pMap, PCR_DISPLAY_ENTRY pNewEntry, PCR_DISPLAY_ENTRY pReplacedEntry); 438 442 int CrDemInit(PCR_DISPLAY_ENTRY_MAP pMap); 439 443 void CrDemTerm(PCR_DISPLAY_ENTRY_MAP pMap); … … 445 449 int crServerDisplaySaveState(PSSMHANDLE pSSM); 446 450 int crServerDisplayLoadState(PSSMHANDLE pSSM, uint32_t u32Version); 451 452 453 void crServerDEntryResized(CRMuralInfo *pMural, CR_DISPLAY_ENTRY *pDEntry); 454 void crServerDEntryMoved(CRMuralInfo *pMural, CR_DISPLAY_ENTRY *pDEntry); 455 void crServerDEntryVibleRegions(CRMuralInfo *pMural, CR_DISPLAY_ENTRY *pDEntry); 456 void crServerDEntryCheckFBO(CRMuralInfo *pMural, CR_DISPLAY_ENTRY *pDEntry, CRContext *ctx); 457 void crServerDEntryCleanup(CR_DISPLAY_ENTRY *pDEntry); 458 459 void crServerDEntryAllResized(CRMuralInfo *pMural); 460 void crServerDEntryAllMoved(CRMuralInfo *pMural); 461 void crServerDEntryAllVibleRegions(CRMuralInfo *pMural); 447 462 448 463 //#define VBOX_WITH_CRSERVER_DUMPER -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_main.c
r47605 r47623 2957 2957 CRMuralInfo *mural = (CRMuralInfo*) data1; 2958 2958 2959 crServerSetupOutputRedirect(mural); 2959 if (!mural->CreateInfo.externalID) 2960 return; 2961 2962 if (cr_server.bUseOutputRedirect) 2963 crServerPresentOutputRedirect(mural); 2964 else 2965 crServerOutputRedirectCheckEnableDisable(mural); 2960 2966 } 2961 2967 -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_muralfbo.c
r47599 r47623 47 47 } 48 48 49 void crServerDEntryResized(CRMuralInfo *pMural, CR_DISPLAY_ENTRY *pDEntry) 50 { 51 /*PBO*/ 52 if (pDEntry->idPBO) 53 { 54 CRASSERT(cr_server.bUsePBOForReadback); 55 cr_server.head_spu->dispatch_table.DeleteBuffersARB(1, &pDEntry->idPBO); 56 pDEntry->idPBO = 0; 57 } 58 59 if (pDEntry->pvORInstance) 60 { 61 cr_server.outputRedirect.CRORGeometry(pDEntry->pvORInstance, 62 pMural->hX + CrVrScrCompositorEntryPosGet(&pDEntry->CEntry)->x, 63 pMural->hY + CrVrScrCompositorEntryPosGet(&pDEntry->CEntry)->y, 64 CrVrScrCompositorEntryTexGet(&pDEntry->CEntry)->width, 65 CrVrScrCompositorEntryTexGet(&pDEntry->CEntry)->height); 66 67 crServerDEntryVibleRegions(pMural, pDEntry); 68 } 69 } 70 71 void crServerDEntryMoved(CRMuralInfo *pMural, CR_DISPLAY_ENTRY *pDEntry) 72 { 73 if (pDEntry->pvORInstance) 74 { 75 cr_server.outputRedirect.CRORGeometry(pDEntry->pvORInstance, 76 pMural->hX + CrVrScrCompositorEntryPosGet(&pDEntry->CEntry)->x, 77 pMural->hY + CrVrScrCompositorEntryPosGet(&pDEntry->CEntry)->y, 78 CrVrScrCompositorEntryTexGet(&pDEntry->CEntry)->width, 79 CrVrScrCompositorEntryTexGet(&pDEntry->CEntry)->height); 80 81 crServerDEntryVibleRegions(pMural, pDEntry); 82 } 83 84 } 85 86 void crServerDEntryCleanup(CR_DISPLAY_ENTRY *pDEntry) 87 { 88 if (pDEntry->pvORInstance) 89 { 90 cr_server.outputRedirect.CROREnd(pDEntry->pvORInstance); 91 pDEntry->pvORInstance = NULL; 92 } 93 } 94 95 void crServerDEntryVibleRegions(CRMuralInfo *pMural, CR_DISPLAY_ENTRY *pDEntry) 96 { 97 if (pDEntry->pvORInstance) 98 { 99 uint32_t cRects; 100 const RTRECT *pRects; 101 102 int rc = CrVrScrCompositorEntryRegionsGet(&pMural->Compositor, &pDEntry->CEntry, &cRects, NULL, &pRects, NULL); 103 if (!RT_SUCCESS(rc)) 104 { 105 crWarning("CrVrScrCompositorEntryRegionsGet failed, rc %d", rc); 106 return; 107 } 108 109 cr_server.outputRedirect.CRORVisibleRegion(pDEntry->pvORInstance, cRects, pRects); 110 } 111 } 112 113 /***/ 114 void crServerDEntryAllResized(CRMuralInfo *pMural) 115 { 116 VBOXVR_SCR_COMPOSITOR_ITERATOR Iter; 117 PVBOXVR_SCR_COMPOSITOR_ENTRY pEntry; 118 119 CrVrScrCompositorIterInit(&pMural->Compositor, &Iter); 120 while ((pEntry = CrVrScrCompositorIterNext(&Iter)) != NULL) 121 { 122 CR_DISPLAY_ENTRY *pDEntry = CR_DENTRY_FROM_CENTRY(pEntry); 123 crServerDEntryResized(pMural, pDEntry); 124 } 125 } 126 127 void crServerDEntryAllMoved(CRMuralInfo *pMural) 128 { 129 VBOXVR_SCR_COMPOSITOR_ITERATOR Iter; 130 PVBOXVR_SCR_COMPOSITOR_ENTRY pEntry; 131 132 CrVrScrCompositorIterInit(&pMural->Compositor, &Iter); 133 134 while ((pEntry = CrVrScrCompositorIterNext(&Iter)) != NULL) 135 { 136 CR_DISPLAY_ENTRY *pDEntry = CR_DENTRY_FROM_CENTRY(pEntry); 137 crServerDEntryMoved(pMural, pDEntry); 138 } 139 } 140 141 void crServerDEntryAllVibleRegions(CRMuralInfo *pMural) 142 { 143 VBOXVR_SCR_COMPOSITOR_ITERATOR Iter; 144 PVBOXVR_SCR_COMPOSITOR_ENTRY pEntry; 145 146 CrVrScrCompositorIterInit(&pMural->Compositor, &Iter); 147 148 while ((pEntry = CrVrScrCompositorIterNext(&Iter)) != NULL) 149 { 150 CR_DISPLAY_ENTRY *pDEntry = CR_DENTRY_FROM_CENTRY(pEntry); 151 crServerDEntryVibleRegions(pMural, pDEntry); 152 } 153 } 154 /**/ 155 156 void crServerDEntryCheckFBO(CRMuralInfo *pMural, CR_DISPLAY_ENTRY *pDEntry, CRContext *ctx) 157 { 158 if (!cr_server.bUsePBOForReadback == !pDEntry->idPBO) 159 return; 160 161 if (cr_server.bUsePBOForReadback) 162 { 163 Assert(!pDEntry->idPBO); 164 cr_server.head_spu->dispatch_table.GenBuffersARB(1, &pDEntry->idPBO); 165 cr_server.head_spu->dispatch_table.BindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, pDEntry->idPBO); 166 cr_server.head_spu->dispatch_table.BufferDataARB(GL_PIXEL_PACK_BUFFER_ARB, 167 CrVrScrCompositorEntryTexGet(&pDEntry->CEntry)->width*CrVrScrCompositorEntryTexGet(&pDEntry->CEntry)->height*4, 168 0, GL_STREAM_READ_ARB); 169 cr_server.head_spu->dispatch_table.BindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, ctx->bufferobject.packBuffer->hwid); 170 171 if (!pDEntry->idPBO) 172 { 173 crWarning("PBO create failed"); 174 } 175 } 176 } 177 49 178 /* Called when a new CRMuralInfo is created 50 179 * or when OutputRedirect status is changed. 51 180 */ 52 void crServerSetupOutputRedirect (CRMuralInfo *mural)181 void crServerSetupOutputRedirectEntry(CRMuralInfo *mural, CR_DISPLAY_ENTRY *pDEntry) 53 182 { 54 183 /* Unset the previous redirect. */ 55 if ( mural->pvOutputRedirectInstance)56 { 57 cr_server.outputRedirect.CROREnd( mural->pvOutputRedirectInstance);58 mural->pvOutputRedirectInstance = NULL;184 if (pDEntry->pvORInstance) 185 { 186 cr_server.outputRedirect.CROREnd(pDEntry->pvORInstance); 187 pDEntry->pvORInstance = NULL; 59 188 } 60 189 … … 76 205 { 77 206 cr_server.outputRedirect.CRORBegin(cr_server.outputRedirect.pvContext, 78 & mural->pvOutputRedirectInstance,207 &pDEntry->pvORInstance, 79 208 "H3DOR_FMT_RGBA_TOPDOWN"); // @todo from a header 80 209 } … … 85 214 86 215 /* If this is not NULL then there was a supported format. */ 87 if ( mural->pvOutputRedirectInstance)216 if (pDEntry->pvORInstance) 88 217 { 89 218 uint32_t cRects; 90 219 const RTRECT *pRects; 91 220 92 int rc = CrVrScrCompositor RegionsGet(&mural->Compositor, &cRects, NULL, &pRects, NULL);221 int rc = CrVrScrCompositorEntryRegionsGet(&mural->Compositor, &pDEntry->CEntry, &cRects, NULL, &pRects, NULL); 93 222 if (!RT_SUCCESS(rc)) 94 223 { … … 97 226 } 98 227 99 cr_server.outputRedirect.CRORGeometry(mural->pvOutputRedirectInstance, 100 mural->hX, mural->hY, 101 mural->width, mural->height); 102 // @todo the code assumes that RTRECT == four of GLInts 103 cr_server.outputRedirect.CRORVisibleRegion(mural->pvOutputRedirectInstance, 104 mural->cVisibleRects, (RTRECT *)mural->pVisibleRects); 105 106 crServerPresentFBO(mural); 228 cr_server.outputRedirect.CRORGeometry(pDEntry->pvORInstance, 229 mural->hX + CrVrScrCompositorEntryPosGet(&pDEntry->CEntry)->x, 230 mural->hY + CrVrScrCompositorEntryPosGet(&pDEntry->CEntry)->y, 231 CrVrScrCompositorEntryTexGet(&pDEntry->CEntry)->width, 232 CrVrScrCompositorEntryTexGet(&pDEntry->CEntry)->height); 233 234 cr_server.outputRedirect.CRORVisibleRegion(pDEntry->pvORInstance, cRects, pRects); 235 //!! 236 // crServerPresentFBO(mural); 107 237 } 108 238 } … … 264 394 } 265 395 266 if (mural->pvOutputRedirectInstance)267 {268 cr_server.outputRedirect.CRORGeometry(mural->pvOutputRedirectInstance,269 mural->hX, mural->hY,270 mural->width, mural->height);271 }272 273 396 crServerVBoxCompositionDisableLeave(mural, GL_FALSE); 274 397 } … … 290 413 } 291 414 292 static void crServer PresentMuralVRAM(CRMuralInfo *mural, char *pixels);415 static void crServerDentryPresentVRAM(CRMuralInfo *mural, CR_DISPLAY_ENTRY *pDEntry, char *pixels); 293 416 294 417 #define CR_SERVER_MURAL_FROM_RPW_ENTRY(_pEntry) ((CRMuralInfo*)(((uint8_t*)(_pEntry)) - RT_OFFSETOF(CRMuralInfo, RpwEntry))) … … 299 422 300 423 Assert(&pMural->RpwEntry == pEntry); 301 302 crServerPresentMuralVRAM(pMural, pvEntryTexData);424 crError("port me!"); 425 // crServerPresentMuralVRAM(pMural, pvEntryTexData); 303 426 } 304 427 … … 420 543 } 421 544 422 if (mural-> aidFBOs[0]==0)545 if (mural->fUseDefaultDEntry && mural->aidFBOs[0]==0) 423 546 { 424 547 crServerCreateMuralFBO(mural); … … 543 666 } 544 667 668 mural->iCurDrawBuffer = crServerMuralFBOIdxFromBufferName(mural, ctx->buffer.drawBuffer); 669 mural->iCurReadBuffer = crServerMuralFBOIdxFromBufferName(mural, ctx->buffer.readBuffer); 670 545 671 mural->fboWidth = mural->width; 546 672 mural->fboHeight = mural->height; … … 548 674 mural->iCurDrawBuffer = crServerMuralFBOIdxFromBufferName(mural, ctx->buffer.drawBuffer); 549 675 mural->iCurReadBuffer = crServerMuralFBOIdxFromBufferName(mural, ctx->buffer.readBuffer); 550 551 /*PBO*/552 if (cr_server.bUsePBOForReadback)553 {554 gl->GenBuffersARB(1, &mural->idPBO);555 gl->BindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, mural->idPBO);556 gl->BufferDataARB(GL_PIXEL_PACK_BUFFER_ARB, mural->width*mural->height*4, 0, GL_STREAM_READ_ARB);557 gl->BindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, ctx->bufferobject.packBuffer->hwid);558 559 if (!mural->idPBO)560 {561 crWarning("PBO create failed");562 }563 }564 676 565 677 /*Restore gl state*/ … … 619 731 mural->aidFBOs[i] = 0; 620 732 } 621 }622 623 if (mural->idPBO!=0)624 {625 CRASSERT(cr_server.bUsePBOForReadback);626 cr_server.head_spu->dispatch_table.DeleteBuffersARB(1, &mural->idPBO);627 mural->idPBO = 0;628 733 } 629 734 … … 649 754 } 650 755 651 static GLboolean crServerIntersectScreen(CRMuralInfo *mural, int sId, CRrecti *rect) 652 { 653 rect->x1 = MAX(mural->gX, cr_server.screen[sId].x); 654 rect->x2 = MIN(mural->gX+(int)mural->fboWidth, cr_server.screen[sId].x+(int)cr_server.screen[sId].w); 655 rect->y1 = MAX(mural->gY, cr_server.screen[sId].y); 656 rect->y2 = MIN(mural->gY+(int)mural->fboHeight, cr_server.screen[sId].y+(int)cr_server.screen[sId].h); 756 static GLboolean crServerIntersectScreen(CRMuralInfo *mural, CR_DISPLAY_ENTRY *pDEntry, int sId, CRrecti *rect) 757 { 758 rect->x1 = MAX(mural->gX + CrVrScrCompositorEntryPosGet(&pDEntry->CEntry)->x, cr_server.screen[sId].x); 759 rect->x2 = MIN(mural->gX + CrVrScrCompositorEntryPosGet(&pDEntry->CEntry)->x 760 + (int)CrVrScrCompositorEntryTexGet(&pDEntry->CEntry)->width, 761 cr_server.screen[sId].x+(int)cr_server.screen[sId].w); 762 rect->y1 = MAX(mural->gY + CrVrScrCompositorEntryPosGet(&pDEntry->CEntry)->y, cr_server.screen[sId].y); 763 rect->y2 = MIN(mural->gY + CrVrScrCompositorEntryPosGet(&pDEntry->CEntry)->y 764 + (int)CrVrScrCompositorEntryTexGet(&pDEntry->CEntry)->height, 765 cr_server.screen[sId].y+(int)cr_server.screen[sId].h); 657 766 658 767 return (rect->x2>rect->x1) && (rect->y2>rect->y1); … … 727 836 } 728 837 729 static void crServerVBoxCompositionReenable(CRMuralInfo *mural, GLboolean fForcePresent) 730 { 731 if (!(mural->fPresentMode & CR_SERVER_REDIR_F_DISPLAY) 732 || (mural->fUseDefaultDEntry && !(mural->fPresentMode & CR_SERVER_REDIR_F_FBO)) 838 static void crServerVBoxCompositionReenable(CRMuralInfo *mural) 839 { 840 GLboolean fForcePresent = mural->fForcePresentState; 841 GLboolean fOrPresentOnReenable = mural->fOrPresentOnReenable; 842 843 mural->fForcePresentState = GL_FALSE; 844 mural->fOrPresentOnReenable = GL_FALSE; 845 846 if ((mural->fUseDefaultDEntry && !(mural->fPresentMode & CR_SERVER_REDIR_F_FBO)) 733 847 || !mural->fDataPresented 734 848 || (!fForcePresent … … 736 850 return; 737 851 738 crServerVBoxCompositionPresentPerform(mural); 852 if (mural->fPresentMode & CR_SERVER_REDIR_F_DISPLAY) 853 crServerVBoxCompositionPresentPerform(mural); 854 855 if (fOrPresentOnReenable 856 && cr_server.bUseOutputRedirect 857 && crServerVBoxCompositionPresentNeeded(mural)) 858 crServerPresentOutputRedirect(mural); 739 859 } 740 860 … … 767 887 if (!mural->cDisabled) 768 888 { 769 crServerVBoxCompositionReenable(mural, mural->fForcePresentState); 770 mural->fForcePresentState = GL_FALSE; 889 crServerVBoxCompositionReenable(mural); 771 890 } 772 891 … … 807 926 } 808 927 809 static void crServer PresentMuralVRAM(CRMuralInfo *mural, char *pixels)928 static void crServerDentryPresentVRAM(CRMuralInfo *mural, CR_DISPLAY_ENTRY *pDEntry, char *pixels) 810 929 { 811 930 char *tmppixels; 812 931 CRrecti rect, rectwr, sectr; 813 int i, j; 932 int i, rc; 933 uint32_t j; 814 934 815 935 if (mural->fPresentMode & CR_SERVER_REDIR_F_FBO_RAM_VMFB) … … 817 937 for (i=0; i<cr_server.screenCount; ++i) 818 938 { 819 if (crServerIntersectScreen(mural, i, &rect)) 820 { 939 if (crServerIntersectScreen(mural, pDEntry, i, &rect)) 940 { 941 uint32_t cRects; 942 const RTRECT *pRects; 943 821 944 /* rect in window relative coords */ 822 945 crServerTransformRect(&rectwr, &rect, -mural->gX, -mural->gY); 823 946 824 if (!mural->pVisibleRects) 947 rc = CrVrScrCompositorEntryRegionsGet(&mural->Compositor, &pDEntry->CEntry, &cRects, NULL, &pRects, NULL); 948 if (RT_SUCCESS(rc)) 825 949 { 826 950 /*we don't get any rects info for guest compiz windows, so we treat windows as visible unless explicitly received 0 visible rects*/ 827 if (!mural->bReceivedRects)951 for (j=0; j<cRects; ++j) 828 952 { 829 tmppixels = crAlloc(4*(rect.x2-rect.x1)*(rect.y2-rect.y1)); 830 if (!tmppixels) 831 { 832 crWarning("Out of memory in crServerPresentFBO"); 833 crFree(pixels); 834 return; 835 } 836 837 crServerCopySubImage(tmppixels, pixels, &rectwr, mural->fboWidth, mural->fboHeight); 838 /*Note: pfnPresentFBO would free tmppixels*/ 839 cr_server.pfnPresentFBO(tmppixels, i, rect.x1-cr_server.screen[i].x, rect.y1-cr_server.screen[i].y, rect.x2-rect.x1, rect.y2-rect.y1); 840 } 841 } 842 else 843 { 844 for (j=0; j<mural->cVisibleRects; ++j) 845 { 846 if (crServerIntersectRect(&rectwr, (CRrecti*) &mural->pVisibleRects[4*j], §r)) 953 if (crServerIntersectRect(&rectwr, (CRrecti*)&pRects[j], §r)) 847 954 { 848 955 tmppixels = crAlloc(4*(sectr.x2-sectr.x1)*(sectr.y2-sectr.y1)); … … 854 961 } 855 962 856 crServerCopySubImage(tmppixels, pixels, §r, mural->fboWidth, mural->fboHeight);963 crServerCopySubImage(tmppixels, pixels, §r, CrVrScrCompositorEntryTexGet(&pDEntry->CEntry)->width, CrVrScrCompositorEntryTexGet(&pDEntry->CEntry)->height); 857 964 /*Note: pfnPresentFBO would free tmppixels*/ 858 965 cr_server.pfnPresentFBO(tmppixels, i, 859 sectr.x1+mural->gX -cr_server.screen[i].x,860 sectr.y1+mural->gY -cr_server.screen[i].y,966 sectr.x1+mural->gX+CrVrScrCompositorEntryPosGet(&pDEntry->CEntry)->x-cr_server.screen[i].x, 967 sectr.y1+mural->gY+CrVrScrCompositorEntryPosGet(&pDEntry->CEntry)->y-cr_server.screen[i].y, 861 968 sectr.x2-sectr.x1, sectr.y2-sectr.y1); 862 969 } 863 970 } 864 971 } 865 } 866 } 867 } 868 869 if (mural->pvOutputRedirectInstance) 972 else 973 { 974 crWarning("CrVrScrCompositorEntryRegionsGet failed, rc %d", rc); 975 } 976 } 977 } 978 } 979 980 if (pDEntry->pvORInstance) 870 981 { 871 982 /* @todo find out why presentfbo is not called but crorframe is called. */ 872 cr_server.outputRedirect.CRORFrame( mural->pvOutputRedirectInstance,983 cr_server.outputRedirect.CRORFrame(pDEntry->pvORInstance, 873 984 pixels, 874 4 * mural->fboWidth * mural->fboHeight);875 } 876 } 877 878 void crServerPresent FBO(CRMuralInfo *mural)985 4 * CrVrScrCompositorEntryTexGet(&pDEntry->CEntry)->width * CrVrScrCompositorEntryTexGet(&pDEntry->CEntry)->height); 986 } 987 } 988 989 void crServerPresentOutputRedirectEntry(CRMuralInfo *pMural, CR_DISPLAY_ENTRY *pDEntry) 879 990 { 880 991 char *pixels=NULL; 881 992 GLuint idPBO; 882 993 CRContext *ctx = crStateGetCurrent(); 883 VBOXVR_TEXTURE Tex; 884 885 CRASSERT(mural->fPresentMode & CR_SERVER_REDIR_F_FBO); 886 CRASSERT(cr_server.pfnPresentFBO || (mural->fPresentMode & CR_SERVER_REDIR_F_DISPLAY)); 887 888 if (!crServerVBoxCompositionPresentNeeded(mural)) 889 return; 890 891 if (mural->fPresentMode & CR_SERVER_REDIR_F_DISPLAY) 892 { 893 crServerVBoxCompositionPresentPerform(mural); 894 } 895 896 mural->fDataPresented = GL_TRUE; 897 898 if (!(mural->fPresentMode & CR_SERVER_REDIR_FGROUP_REQUIRE_FBO_RAM)) 899 return; 900 901 Tex.width = mural->width; 902 Tex.height = mural->height; 903 Tex.target = GL_TEXTURE_2D; 904 Tex.hwid = mural->aidColorTexs[CR_SERVER_FBO_FB_IDX(mural)]; 905 CRASSERT(Tex.hwid); 906 907 if (mural->fPresentMode & CR_SERVER_REDIR_F_FBO_RPW) 908 { 994 995 if (!pDEntry->pvORInstance) 996 { 997 crServerSetupOutputRedirectEntry(pMural, pDEntry); 998 if (!pDEntry->pvORInstance) 999 { 1000 crWarning("crServerSetupOutputRedirectEntry failed!"); 1001 return; 1002 } 1003 } 1004 1005 crServerDEntryCheckFBO(pMural, pDEntry, ctx); 1006 1007 if (pMural->fPresentMode & CR_SERVER_REDIR_F_FBO_RPW) 1008 { 1009 crError("port me!"); 1010 #if 0 909 1011 /* 1. blit to RPW entry draw texture */ 910 1012 CRMuralInfo *pCurrentMural = cr_server.currentMural; … … 972 1074 } 973 1075 #endif 1076 #endif 974 1077 return; 975 1078 } 976 1079 977 if (cr_server.bUsePBOForReadback && ! mural->idPBO)1080 if (cr_server.bUsePBOForReadback && !pDEntry->idPBO) 978 1081 { 979 1082 crWarning("Mural doesn't have PBO even though bUsePBOForReadback is set!"); 980 1083 } 981 1084 982 idPBO = cr_server.bUsePBOForReadback ? mural->idPBO : 0; 983 if (idPBO) 984 { 985 CRASSERT(mural->fboWidth == mural->width); 986 CRASSERT(mural->fboHeight == mural->height); 987 } 988 989 pixels = CrHlpGetTexImage(ctx, &Tex, idPBO, GL_BGRA); 1085 idPBO = cr_server.bUsePBOForReadback ? pDEntry->idPBO : 0; 1086 1087 pixels = CrHlpGetTexImage(ctx, CrVrScrCompositorEntryTexGet(&pDEntry->CEntry), idPBO, GL_BGRA); 990 1088 if (!pixels) 991 1089 { … … 994 1092 } 995 1093 996 crServer PresentMuralVRAM(mural, pixels);1094 crServerDentryPresentVRAM(pMural, pDEntry, pixels); 997 1095 998 1096 CrHlpFreeTexImage(ctx, idPBO, pixels); 1097 } 1098 1099 void crServerPresentOutputRedirect(CRMuralInfo *pMural) 1100 { 1101 VBOXVR_SCR_COMPOSITOR_ITERATOR Iter; 1102 PVBOXVR_SCR_COMPOSITOR_ENTRY pEntry; 1103 1104 CrVrScrCompositorIterInit(&pMural->Compositor, &Iter); 1105 1106 while ((pEntry = CrVrScrCompositorIterNext(&Iter)) != NULL) 1107 { 1108 CR_DISPLAY_ENTRY *pDEntry = CR_DENTRY_FROM_CENTRY(pEntry); 1109 crServerPresentOutputRedirectEntry(pMural, pDEntry); 1110 } 1111 } 1112 1113 void crServerOutputRedirectCheckEnableDisable(CRMuralInfo *pMural) 1114 { 1115 VBOXVR_SCR_COMPOSITOR_ITERATOR Iter; 1116 PVBOXVR_SCR_COMPOSITOR_ENTRY pEntry; 1117 1118 CrVrScrCompositorIterInit(&pMural->Compositor, &Iter); 1119 1120 while ((pEntry = CrVrScrCompositorIterNext(&Iter)) != NULL) 1121 { 1122 CR_DISPLAY_ENTRY *pDEntry = CR_DENTRY_FROM_CENTRY(pEntry); 1123 crServerSetupOutputRedirectEntry(pMural, pDEntry); 1124 } 1125 } 1126 1127 void crServerPresentFBO(CRMuralInfo *mural) 1128 { 1129 CRASSERT(mural->fPresentMode & CR_SERVER_REDIR_F_FBO); 1130 CRASSERT(cr_server.pfnPresentFBO || (mural->fPresentMode & CR_SERVER_REDIR_F_DISPLAY)); 1131 1132 if (!crServerVBoxCompositionPresentNeeded(mural)) 1133 return; 1134 1135 mural->fDataPresented = GL_TRUE; 1136 1137 if (mural->fPresentMode & CR_SERVER_REDIR_F_DISPLAY) 1138 crServerVBoxCompositionPresentPerform(mural); 1139 1140 if (mural->fPresentMode & CR_SERVER_REDIR_FGROUP_REQUIRE_FBO_RAM) 1141 crServerPresentOutputRedirect(mural); 999 1142 } 1000 1143 -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_presenter.cpp
r47602 r47623 38 38 /* DISPLAY */ 39 39 40 //static DECLCALLBACK(int) crDpCbRegionsChanged(struct CR_PRESENTER *pPresenter)41 //{42 // uint32_t cRegions;43 // const RTRECT *paRegions;44 // int rc = CrPtGetRegions(pPresenter, &cRegions, &paRegions);45 // if (!RT_SUCCESS(rc))46 // {47 // crWarning("CrPtGetRegions failed, rc %d", rc);48 // return rc;49 // }50 //51 // PCR_DISPLAY pDisplay = CR_DISPLAY_FROM_PRESENTER(pPresenter);52 //53 // cr_server.head_spu->dispatch_table.WindowVisibleRegion(pDisplay->Mural.spuWindow, cRegions, (GLint*)paRegions);54 //55 // if (pDisplay->Mural.pvOutputRedirectInstance)56 // {57 // /* @todo the code assumes that RTRECT == four GLInts. */58 // cr_server.outputRedirect.CRORVisibleRegion(pDisplay->Mural.pvOutputRedirectInstance,59 // cRegions, paRegions);60 // }61 //62 // return VINF_SUCCESS;63 //}64 65 40 int CrDpInit(PCR_DISPLAY pDisplay) 66 41 { … … 202 177 } 203 178 204 rc = CrDpEntryRegionsAdd(pDisplay, pDEntry, &Pos, (uint32_t)cRects, (const RTRECT*)pRects );179 rc = CrDpEntryRegionsAdd(pDisplay, pDEntry, &Pos, (uint32_t)cRects, (const RTRECT*)pRects, NULL); 205 180 AssertRCReturn(rc, rc); 206 181 … … 236 211 } 237 212 238 int CrDpEntryRegionsAdd(PCR_DISPLAY pDisplay, PCR_DISPLAY_ENTRY pEntry, const RTPOINT *pPos, uint32_t cRegions, const RTRECT *paRegions )213 int CrDpEntryRegionsAdd(PCR_DISPLAY pDisplay, PCR_DISPLAY_ENTRY pEntry, const RTPOINT *pPos, uint32_t cRegions, const RTRECT *paRegions, CR_DISPLAY_ENTRY_MAP *pMap) 239 214 { 240 215 uint32_t fChangeFlags = 0; 241 int rc = CrVrScrCompositorEntryRegionsAdd(&pDisplay->Mural.Compositor, pEntry ? &pEntry->CEntry : NULL, pPos, cRegions, paRegions, false, &fChangeFlags); 216 VBOXVR_SCR_COMPOSITOR_ENTRY *pReplacedScrEntry = NULL; 217 218 if (pMap) 219 CrDemEnter(pMap); 220 221 int rc = CrVrScrCompositorEntryRegionsAdd(&pDisplay->Mural.Compositor, pEntry ? &pEntry->CEntry : NULL, pPos, cRegions, paRegions, false, &pReplacedScrEntry, &fChangeFlags); 242 222 if (RT_SUCCESS(rc)) 243 223 { … … 251 231 else 252 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); 239 } 240 else 241 { 242 Assert(!pReplacedScrEntry); 253 243 } 254 244 } 255 245 else 256 246 crWarning("CrVrScrCompositorEntryRegionsAdd failed, rc %d", rc); 247 248 if (pMap) 249 CrDemLeave(pMap, CR_DENTRY_FROM_CENTRY(pEntry), CR_DENTRY_FROM_CENTRY(pReplacedScrEntry)); 257 250 258 251 return rc; … … 282 275 CrVrScrCompositorEntryInit(&pEntry->RootVrCEntry, pTextureData, NULL); 283 276 CrVrScrCompositorEntryFlagsSet(&pEntry->RootVrCEntry, fFlags); 277 pEntry->pvORInstance = NULL; 284 278 } 285 279 … … 298 292 { 299 293 pDisplay->Mural.fDataPresented = GL_TRUE; 294 pDisplay->Mural.fOrPresentOnReenable = GL_TRUE; 300 295 crServerVBoxCompositionDisableLeave(&pDisplay->Mural, pDisplay->fForcePresent); 301 296 pDisplay->fForcePresent = GL_FALSE; … … 313 308 CR_DEM_ENTRY_INFO *pInfo; 314 309 CR_DISPLAY_ENTRY_MAP *pMap; 310 RTLISTNODE Node; 315 311 } CR_DEM_ENTRY; 316 312 … … 370 366 static void crDemEntryFree(CR_DEM_ENTRY* pDemEntry) 371 367 { 368 crServerDEntryCleanup(&pDemEntry->Entry); 372 369 RTMemCacheFree(g_VBoxCrDemLookasideList, pDemEntry); 373 370 } … … 406 403 } 407 404 408 crDemEntryFree(pDemEntry);409 410 405 crStateGlobalSharedRelease(); 406 407 if (!pMap->cEntered) 408 crDemEntryFree(pDemEntry); 409 else 410 RTListNodeInsertAfter(&pMap->ReleasedList, &pDemEntry->Node); 411 411 } 412 412 … … 415 415 pMap->pTexIdToDemInfoMap = crAllocHashtable(); 416 416 if (pMap->pTexIdToDemInfoMap) 417 { 418 RTListInit(&pMap->ReleasedList); 417 419 return VINF_SUCCESS; 420 } 418 421 419 422 crWarning("crAllocHashtable failed"); … … 423 426 void CrDemTerm(PCR_DISPLAY_ENTRY_MAP pMap) 424 427 { 428 CRASSERT(RTListIsEmpty(&pMap->ReleasedList)); 429 CRASSERT(!pMap->cEntered); 425 430 crFreeHashtable(pMap->pTexIdToDemInfoMap, NULL); 426 431 pMap->pTexIdToDemInfoMap = NULL; 432 } 433 434 void CrDemEnter(PCR_DISPLAY_ENTRY_MAP pMap) 435 { 436 ++pMap->cEntered; 437 Assert(pMap->cEntered); 438 } 439 440 void CrDemLeave(PCR_DISPLAY_ENTRY_MAP pMap, PCR_DISPLAY_ENTRY pNewEntry, PCR_DISPLAY_ENTRY pReplacedEntry) 441 { 442 Assert(pMap->cEntered); 443 --pMap->cEntered; 444 Assert(!pReplacedEntry || pNewEntry); 445 if (pNewEntry && pReplacedEntry) 446 { 447 CR_DEM_ENTRY *pNewDemEntry = PCR_DEM_ENTRY_FROM_ENTRY(pNewEntry); 448 CR_DEM_ENTRY *pReplacedDemEntry = PCR_DEM_ENTRY_FROM_ENTRY(pReplacedEntry); 449 Assert(!RTListIsEmpty(&pMap->ReleasedList)); 450 Assert(!RTListIsEmpty(&pReplacedDemEntry->Node)); 451 Assert(RTListIsEmpty(&pNewDemEntry->Node)); 452 Assert(!pNewDemEntry->Entry.pvORInstance); 453 if (!pNewDemEntry->Entry.pvORInstance) 454 { 455 pNewDemEntry->Entry.pvORInstance = pReplacedDemEntry->Entry.pvORInstance; 456 pReplacedDemEntry->Entry.pvORInstance = NULL; 457 } 458 RTListNodeRemove(&pReplacedDemEntry->Node); 459 crDemEntryFree(pReplacedDemEntry); 460 } 461 462 if (!pMap->cEntered) 463 { 464 CR_DEM_ENTRY *pCurEntry, *pNextEntry; 465 RTListForEachSafe(&pMap->ReleasedList, pCurEntry, pNextEntry, CR_DEM_ENTRY, Node) 466 { 467 RTListNodeRemove(&pCurEntry->Node); 468 crDemEntryFree(pCurEntry); 469 } 470 } 427 471 } 428 472 … … 516 560 pDemEntry->pInfo = pInfo; 517 561 pDemEntry->pMap = pMap; 562 RTListInit(&pDemEntry->Node); 518 563 519 564 /* just use main context info's context to hold the texture reference */ … … 711 756 } 712 757 713 void CrHlpPutTexImage(CRContext *pCurCtx, PVBOXVR_TEXTUREpTexture, GLenum enmFormat, void *pvData)758 void CrHlpPutTexImage(CRContext *pCurCtx, const VBOXVR_TEXTURE *pTexture, GLenum enmFormat, void *pvData) 714 759 { 715 760 CRASSERT(pTexture->hwid); … … 743 788 } 744 789 745 void* CrHlpGetTexImage(CRContext *pCurCtx, PVBOXVR_TEXTUREpTexture, GLuint idPBO, GLenum enmFormat)790 void* CrHlpGetTexImage(CRContext *pCurCtx, const VBOXVR_TEXTURE *pTexture, GLuint idPBO, GLenum enmFormat) 746 791 { 747 792 void *pvData = NULL; … … 843 888 { 844 889 RTPOINT Point = {xPos, yPos}; 845 int rc = CrDpEntryRegionsAdd(pDisplay, pEntry, &Point, (uint32_t)cRects, (const RTRECT*)pRects );890 int rc = CrDpEntryRegionsAdd(pDisplay, pEntry, &Point, (uint32_t)cRects, (const RTRECT*)pRects, &cr_server.PresentTexturepMap); 846 891 if (!RT_SUCCESS(rc)) 847 892 { -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_window.c
r47601 r47623 111 111 { 112 112 return crServerDispatchWindowCreateEx(dpyName, visBits, -1); 113 } 114 115 static DECLCALLBACK(void) crServerMuralDefaultEntryReleasedCB(const struct VBOXVR_SCR_COMPOSITOR *pCompositor, struct VBOXVR_SCR_COMPOSITOR_ENTRY *pEntry, struct VBOXVR_SCR_COMPOSITOR_ENTRY *pReplacingEntry) 116 { 117 CR_DISPLAY_ENTRY *pDEntry = CR_DENTRY_FROM_CENTRY(pEntry); 118 crServerDEntryCleanup(pDEntry); 113 119 } 114 120 … … 153 159 Tex.target = GL_TEXTURE_2D; 154 160 Tex.hwid = 0; 155 CrVrScrCompositorEntryInit(&mural->DefaultDEntry.CEntry, &Tex, NULL);161 CrVrScrCompositorEntryInit(&mural->DefaultDEntry.CEntry, &Tex, crServerMuralDefaultEntryReleasedCB); 156 162 157 163 if (cr_server.fRootVrOn) … … 160 166 mural->fRootVrOn = GL_TRUE; 161 167 } 168 169 mural->DefaultDEntry.pvORInstance = NULL; 162 170 } 163 171 … … 179 187 mural->bReceivedRects = GL_FALSE; 180 188 181 mural->pvOutputRedirectInstance = NULL;182 183 189 /* generate ID for this new window/mural (special-case for file conns) */ 184 190 if (cr_server.curClient && cr_server.curClient->conn->type == CR_FILE) … … 207 213 } 208 214 } 209 210 crServerSetupOutputRedirect(mural);211 215 212 216 if (mural->fRootVrOn) … … 364 368 void crServerMuralTerm(CRMuralInfo *mural) 365 369 { 366 if (mural->pvOutputRedirectInstance)367 {368 cr_server.outputRedirect.CROREnd(mural->pvOutputRedirectInstance);369 mural->pvOutputRedirectInstance = NULL;370 }371 372 370 crServerRedirMuralFBO(mural, CR_SERVER_REDIR_F_NONE); 373 371 crServerDeleteMuralFBO(mural); … … 627 625 crServerWindowVisibleRegion(mural); 628 626 629 if (mural->pvOutputRedirectInstance) 630 { 631 uint32_t cRects; 632 const RTRECT *pRects; 633 634 /* always get non-stretched rects for output redirect */ 635 // if (mural->fRootVrOn) 636 { 637 rc = CrVrScrCompositorRegionsGet(&mural->Compositor, &cRects, NULL, NULL, &pRects); 638 if (!RT_SUCCESS(rc)) 639 { 640 crWarning("CrVrScrCompositorRegionsGet failed, rc %d", rc); 641 goto end; 642 } 643 } 644 /* @todo the code assumes that RTRECT == four GLInts. */ 645 cr_server.outputRedirect.CRORVisibleRegion(mural->pvOutputRedirectInstance, 646 cRects, pRects); 647 } 648 627 crServerDEntryAllResized(mural); 649 628 end: 650 629 /* 3. (so far not needed for resize, but in case it is in the future) re-set the compositor (see above comment) */ … … 731 710 crServerCheckMuralGeometry(mural); 732 711 712 crServerDEntryAllMoved(mural); 713 733 714 /* 3. re-set the compositor (see above comment) */ 734 715 crServerVBoxCompositionDisableLeave(mural, fForcePresent); … … 817 798 crServerWindowVisibleRegion(mural); 818 799 819 if (mural->pvOutputRedirectInstance) 820 { 821 const RTRECT * pRealRects; 822 uint32_t cRealRects; 823 824 /* always get unstretched regions here */ 825 rc = CrVrScrCompositorRegionsGet(&mural->Compositor, &cRealRects, NULL, NULL, &pRealRects); 826 if (!RT_SUCCESS(rc)) 827 { 828 crWarning("CrVrScrCompositorRegionsGet failed, rc %d", rc); 829 goto end; 830 } 831 832 /* @todo the code assumes that RTRECT == four GLInts. */ 833 cr_server.outputRedirect.CRORVisibleRegion(mural->pvOutputRedirectInstance, cRealRects, pRealRects); 834 } 800 crServerDEntryAllVibleRegions(mural); 835 801 } 836 802 end:
Note:
See TracChangeset
for help on using the changeset viewer.